[Zope3-dev] Re: Question about skins (standard_macros)
Tonico Strasser
contact_tonico at yahoo.de
Thu Oct 7 10:29:20 EDT 2004
Florian Lindner wrote:
> Hello,
> I've questions about developing skins:
>
> In chapter 24 of Stephens Zope book he refers to <html
> metal:use-macro="views/standard_macros/page">. Where does this
> standard_macros come from? In the chapter only a skin_macros and
> dialog_macros are registered. I think it got sometthing to do with
> zope.app.basicskin.standardmacros.StandardMacros but I can't really
> figure out how...
The standard_macros seems to be configured in 'configure.zcml'
<browser:page
for="*"
name="standard_macros"
permission="zope.View"
class=".standardmacros.StandardMacros"
layer="rotterdam"
allowed_interface="zope.interface.common.mapping.IItemMapping"
/>
This is from 'standardmacros.py':
macro_pages = ('skin_macros', 'view_macros', 'dialog_macros',
'navigation_macros')
Another excerpt from 'configure.czml':
<browser:page
for="*"
name="skin_macros"
permission="zope.View"
layer="rotterdam"
template="template.pt"
/>
And here is the 'page' macro in 'template.pt':
<metal:block define-macro="page">
From my understanding, 'standard_macros' is a name that holds macros
defined in 'standardmacros.py'. The names in the 'macro_pages' tuple are
configured in 'configure.zcml'. I might be wrong, though.
But I'm sure, a nice Guru on this list can explain it much better ;)
Tonico
More information about the Zope3-dev
mailing list