the z3c:pagelet directive have a strange behavior when you provide a
template attribute. The template path is not resolved like in standard
browser:page so when you try to call your pagelet you get a "unicode
is not callable" error.
I know that the way to associate a template to a pagelet is to use a
z3c:template or a class attribute but this behavior can make a lot of
So I see two options:
- resolve the template path in the directive and give a real
ViewPageTemplateFile to the class like in browser:page
- raising a ConfigurationError if a template key is found in **kwargs
if you want to force the use of z3c:template.
I like the first one because you don't always need a z3c:template and
writing template="sample.pt" is shorter than from ... import
ViewpageTemplateFile; template = ViewPageTemplateFile('sample.pt').
May be i can give a patch for this. Let me know.
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -