[Zope] Re: ZPT and attributes

Duncan Booth duncan.booth at suttoncourtenay.org.uk
Sat Apr 9 07:15:33 EDT 2005


Antonio Beamud Montero wrote:

> How I can create attribute names dynamically?
> For example, I want something like this:
><books ref1="http://boo" ref2="http://foo" ...>
> 
> Where ref1 and ref2, are created by the url list.
> I have done in DTML because I cannot with ZPT.
> 

The easiest way is probably to create the tag in something else (e.g. a 
Python script) and then just insert it into your output at the relevant 
point:

<books tal:replace="structure here/generateBooksTag" />

A better solution would be to avoid doing this in the first place.



More information about the Zope mailing list