[Zope3-dev] Re: ZPT Macros

Roger Ineichen dev at projekt01.ch
Mon Oct 10 16:28:37 EDT 2005


Hi Tonico

> -----Original Message-----
> From: zope3-dev-bounces+dev=projekt01.ch at zope.org 
> [mailto:zope3-dev-bounces+dev=projekt01.ch at zope.org] On 
> Behalf Of Tonico Strasser
> Sent: Monday, October 10, 2005 1:22 PM
> To: zope3-dev at zope.org
> Cc: jim at zope.org; 'Stephan Richter'
> Subject: [Zope3-dev] Re: ZPT Macros
> 
> 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/ComponentArchitectu
> re/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.

After the sprint, I think the problem with such implementations
is, that we are to far away from the development right now. 
Such concept are usefull if the target is UI and skin development,
other wise we don't get feedback and nobody is interessted to
think about it.

I will implement a macro registration in the Tiks framework first,
so we can show this to other developers before we perhaps
move it to the z3 trunk later.

> 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".

I know what you mean, but like we discuss at the sprint that are 
two different concepts.

We only can provide a TALES namescape like "macros:..." otherwise
we have to use a own page template implementation where uses a macro
namespace as a constructor argument.
But then we can't use the browser:page and all this directives for the
registration out of the box.

I prefere a macro namspace for TAL. Otherwise we have to implement
different new ZCML registration directives where are using a custom
page template implementation.

Tonico's vision of templates (see zope3.org):
But note that's not the right solution for what you need. If we 
implement the macro registration and a TALES expression, you only 
can use the registration. For your idea, you will need a own page
template implementation additionaly to the ZCML macro regsitration.

Perhaps the push templates, where I presented at the sprint, are a 
better solution for simplify the page assembling for the future.

Regards
Roger Ineichen

Projekt01 GmbH
www.projekt01.ch
_____________________________
END OF MESSAGE  


> Tonico
> 
> _______________________________________________
> Zope3-dev mailing list
> Zope3-dev at zope.org
> Unsub: 
> http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
> 
> 



More information about the Zope3-dev mailing list