Am 18.07.2007 um 23:10 schrieb Maurits van Rees:
No, that is the name. That means you can do
in a template that has an IEvent provider as context.
The class is the EventiCalView class in event.py.
So, let's say I need to turn my creation date into
I can call this in my view class via
self.startdate = self.context.CreationDate()
and call this in my template via
Yes. You need to do the tal:define above first though, unless there
is some other magic (well, code) that hooks up this view to that
Actually I don't define the view explicitly in the template as my
class calls it directly.
I think that is done when you specify
template="mytemplate" in the zcml snippet.
Well, I've now got two classes (EventvCalView has to set different
headers so I can't see an easy way round this in ZCML) and two
different templates. Everything is working fine apart from the
content-type is remaining steadfastly text/html! Content-Disposition
is being set correctly. How do I fix this? ;-)
Tomorrow I'll try and write the tests for this so that I can submit
the patch. And I'll also have something to talk about at the
Rheinland ZUG meeting on Friday! ;-)
Zope-CMF maillist - Zope-CMF@lists.zope.org
See http://collector.zope.org/CMF for bug reports and feature requests