user966660
user966660

Reputation: 592

Plone Dexterity example without Grok

Does anybody know any good examples of Dexterity-based Contenttypes, without use of Grok?

... just for learning purposes

Upvotes: 1

Views: 173

Answers (1)

adamfc
adamfc

Reputation: 178

Grok is kind of just a convenience wrapper around the ZCA. Your types can just be changed to use ZCML or just plain zope. For example, the following:

class View(grok.View):
    grok.context(IProgram)
    grok.require('zope2.View')

This would just convert to the following in ZCML:

<browser:page
    name="view"
    for="IProgram"
    permission="zope2.View"
    class=".yourviewmodule.View"
    template=".yourtemplate.pt"
    />

Upvotes: 3

Related Questions