[Zope3-dev] Re: ZPT Macros
    Tonico Strasser 
    contact_tonico at yahoo.de
       
    Mon Oct 10 07:21:54 EDT 2005
    
    
  
Roger Ineichen schrieb:
> Hi together 
> 
> I like to simplify the macro registration.
> The target is to get rid of the mapping in a custom class
> where we use right now (StandardMacros) and offer a directive
> for register macros in ZCML.
> 
> See the proposal at:
> http://www.zope.org/Wikis/DevSite/Projects/ComponentArchitecture/SimplifyMac
> roRegistration
> 
> Can you tell me what you think?
The ZCML directive is invisible on the Wiki, this I copied from the HTML 
source:
<browser:macros
           for="*"
           name="standard_macros"
           macros="page"
           aliases="view:page dialog:page"    (only if we need to 
support the mapping)
           permission="zope.View"
           template="template.pt"
           layer="tiks.skins.basic.basic"
           />
I Like that. I think it would be very useful to be able to configure 
macros and access them in Python, at least for my use cases.
Regarding: <html metal:use-macro="macros:standard_macros/my_macro">
I'm not sure I want another prefix in ZPT. I would prefer to provide (or 
push?) a custom namespace to the template and then use 
"standard_macros/my_macro" or simply "macros/my_macro".
Tonico
    
    
More information about the Zope3-dev
mailing list