[Zope] Re: ZPT and attributes
Josef Meile
jmeile at hotmail.com
Fri Apr 8 13:42:00 EDT 2005
Hi Antonio,
>>>Hi all:
>>>How I can create attribute names dynamically?
>>
>>tal:attributes="attributename expression"
>
>
> Sorry, I haven't explain the problem correctly :)
> The problem is the number of "refX" depends on the list of urls, i.e. if
> I have ['http://foo', 'http://boo', 'http://google.com'] then I create:
>
> <books ref1='http://foo' ref2='http://boo' ref3='http://google.com'>
>
> but with ['http://foo'] I create:
>
> <books ref1='http://foo'>
>
> How I create refX?
>
> Greetings.
>
>
>
>>For example, I want something like this:
>><books tal:attributes="ref1 string:http://boo";
>> ref2 request/URL3" />
>>
>>And so on.
I think you are using zpt for the wrong thing. For me it seems that what
you should use would be a xml product like ParsedXML. I haven't used it,
but I have taken a look at the source code of Silva and saw that it may
be possible to create dynamic attributes with a "setAttribute" or some
thing like that.
Regards,
Josef
More information about the Zope
mailing list