[Grok-dev] Using five.grok to add new viewlets
Vincent Fretin
vincent.fretin at gmail.com
Wed Dec 31 04:22:29 EST 2008
Hello,
I started to blog about my recent work on archgenxml:
http://vincentfretin.ecreall.com/
I wrote a post about my experience of using five.grok to create
viewlets in a Plone product.
Here it is:
http://vincentfretin.ecreall.com/articles/using-five.grok-to-add-viewlets
You'll see in a comment that I didn't manage to use grok.PageTemplateFile
This work:
from Products.Five.browser.pagetemplatefile import ZopeTwoPageTemplateFile
template = ZopeTwoPageTemplateFile('templates/adviewlet.pt')
def render(self):
return self.template()
And I tried various things, I didn't manage to use grok.PageTemplateFile.
My last try was:
template = grok.PageTemplateFile('templates/adviewlet.pt')
def render(self):
self.template.render(self)
But this don't work.
How it is supposed to work? How do you render the template if you use
grok.PageTemplateFile?
I asked to be added to planet plone, but nobody answered:
https://dev.plone.org/plone.org/ticket/1029
Regards
--
Vincent Fretin
More information about the Grok-dev
mailing list