[Zope] Re: metal Macros from PageTemplateFiles?
Robert Casties
casties at mpiwg-berlin.mpg.de
Wed Jan 19 10:25:56 EST 2005
Tino Wildenhain wrote:
[...]
>>But when I try to do:
>>
>> def content_template(self):
>> pt = PageTemplateFile("/some/file/template.zpt")
>> return pt
>>
>>then the procedure is never called and I get an error in the ZPT that
>>tries to use the macro:
>>
>> Error Type: AttributeError
>> Error Value: content_templatemacros
>>
>>Somewhere I read a vage reference to invoke "cook" but I don't know how.
>>
>
>
> Read the answer I already gave to your identical mail (yesterday?) :-)
I already tried
return pt.__of__(self)
but the error is the same. Also the function doesn't seem to get called
at all when the page that should use the macro is requested.
(I use the __of__(self) of course for simple PageTemplates.)
Regards
Robert
More information about the Zope
mailing list