[Zope] Re: ZPT/TAL computed names?

Tonico Strasser contact_tonico at yahoo.de
Thu Mar 4 18:59:58 EST 2004


J C Lawrence wrote:

> How can I invoke a macro or a tal:replace where the macro or object name
> has been dynamically computed at runtime?
> 
> eg:
> 
>   <tal block define = "name string:thing_${type}_${type}">
>     <tal: replace = "structure here/${name}" />
>   </tal:block>
> 

   <tal:block define="name string:thing_${type}_${type}">
     <tal:block replace="structure here/?name" />
   </tal:block>


>   or
> 
>   <tal block define = "name string:macro_${type}_${type}">
>     <div: metal:use-macro = "here/macro_file/${name}" />
>   </tal:block>

   <tal:block define="name string:macro_${type}_${type}">
     <div metal:use-macro="here/macro_file/macros/?name" />
   </tal:block>

Is this what you are looking for?

Tonico




More information about the Zope mailing list