[Grok-dev] Re: five.grok and page templates
Martin Aspeli
optilude at gmx.net
Mon Aug 4 15:50:45 EDT 2008
Wichert Akkerman wrote:
> Have you checked if this still works with z3c.jbot? That should be a
> requirement before using something like this in Plone.
I can happily report that z3c.jbot does work. :)
For example, I have example.dexterity.page, which contains:
from five import grok
from plone.dexterity import api as dexterity
class IPage(dexterity.Schema):
dexterity.model("page.xml")
class View(grok.View):
grok.context(IPage)
grok.require('zope2.View')
This will result in a View for IPage called @@view. The template is
found in src/example.dexterity/example/dexterity/page_templates/view.pt.
I then did an override using z3c.jbot called
example.dexterity.page_templates.view.pt in a directory registered with
z3c.jbot, which is correctly picked up.
Martin
--
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Grok-dev
mailing list