[Zope3-dev] Re: Question about skins (standard_macros)
Florian Lindner
mailinglists at xgm.de
Thu Oct 7 08:46:45 EDT 2004
Tonico Strasser schrieb:
> 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.
>
I already thought something like that. But how does Zope knows which
macros out of the macro_pages to pick?
Florian
More information about the Zope3-dev
mailing list