[Zope] Re: ZPT and attributes

2005-04-09 Thread Duncan Booth
Antonio Beamud Montero wrote:

> How I can create attribute names dynamically?
> For example, I want something like this:
>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:



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

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Re: ZPT and attributes

2005-04-08 Thread Josef Meile
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:

but with ['http://foo'] I create:

How I create refX?
Greetings.

For example, I want something like this:
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )