[z3-five] Using templates for content providers
Anton Stonor
anton at headnet.dk
Wed Aug 23 14:10:17 CEST 2006
I wrote:
> How do I use a page template to render a content provider on Zope
> 2.9.3/Five 1.4?
>
> My dummy content provider works (see below).
>
> Now I want to use a page template to render the HTML fragment.
>
> However, doing this ....
>
> render = ZopeTwoPageTemplateFile('fragment.pt')
OK, digging deeper: It looks like I need to wrap the template in
acquisition: ZopeTwoPageTemplateFile('fragment.pt').__of__(self.context)
That works.
This issue remains:
> Another, related issue: Is it possible in ZCML to configure a page
> template to be used for a content provider - like for normal views?
/Anton
More information about the z3-five
mailing list