Am 18.07.2007 um 23:10 schrieb Maurits van Rees:

No, that is the name.  That means you can do

  tal:define="view context/@@event_iCal_view"

in a template that has an IEvent provider as context.

The class is the EventiCalView class in

Yes, thanks.
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
specific template.

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! ;-)

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

Zope-CMF maillist  -

See for bug reports and feature requests

Reply via email to