Hi Tonico

> -----Original Message-----
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Tonico Strasser
> Sent: Monday, October 10, 2005 10:49 PM
> To: zope3-dev@zope.org
> Cc: zope3-dev@zope.org
> Subject: [Zope3-dev] Re: ZPT Macros
> Roger Ineichen schrieb:
> >>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.
> Ok, I don't really understand what this all means. I have trivial use 
> cases and don't understand why everything has to be so complicated.

It's only because the macros registration via ZCML and the TALES 
expression isn't the right concept for what you where shoing at the

For your idea, you need to implement a custom page template where 
provides a macros namspace. Then you can call macros in TAL like:

<metal:block use-macro="macros/myMacro" />

If we like to use the standard page template we don't have this 
"macro" namespace and need a TALES expression for the macro 
lookup like:

<metal:block use-macro="macros:myMacro" />

Right now without a macros ZCML directive we use macros via a 
additional page (view) hook like:

<metal:block use-macro="context/@@macros/myMacro" />

In this case the "@@macros" is a view registred with a own python 
class inherited from the class Macros. Most the time called
StandardMacros (see Rotterdam skin).

I only propose to get rid of this additional python class 
implementation and view registration and like to offer a 
ZCML directive and a TALES namespace explicit for macros.

Roger Ineichen

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

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to