[Zope-CMF] Custom Event View

Charlie Clark charlie at begeistert.org
Thu Jul 19 07:22:47 EDT 2007


Thanks to everybody's help yesterday I've got working templates but  
they're not yet ready for release. :-(

Looking at the source of CMFCalender/browser/event.py related I'm  
looking for the best way to access event attributes which I am not  
going to touch such as location or contact_name

EventView inherits from CMFDefault/formlib/form.py and as I need to  
set the headers I can't do this, I think. It looks like  
EventTypeVocabulary does the necessary decoding of the various  
attributes but I can't see how to access this from within a template  
although it must be happening for EventView. The alternative approach  
used in calendar_tool.py or document.py seems to be to provide  
explicit methods for accessing Title(), Description(), etc. So if I  
inherit from CMFDefault/browser/utils.py/ViewBase I get title and  
description. Should I extend my view class with methods for the  
location, contact_name, etc. or can I get them from the vocabulary?

Thanks

Charlie
--
Charlie Clark
Helmholtzstr. 20
Düsseldorf
D- 40215
Tel: +49-211-938-5360
GSM: +49-178-782-6226





More information about the Zope-CMF mailing list