Defining 'all-purpose' macros
1 2 3 4 5 | from zope.interface import Interface
import grok
class Master(grok.View):
grok.context(Interface)
|
and reference the macros of the associated pagetemplate like this:
context/@@master/macros/<macro-name>
Because the macros in Master now are 'bound' (in fact their view is bound) to Interface and every Grok application, model or container implements some interface, the Master macros will be accessible from nearly every other context. Master promises to be a view for every object, which implements Interface.

