[PHPTAL] inserting information into attributes

Stefan Schwardt newsletter at stefan-schwardt.de
Thu May 18 11:49:04 CEST 2006


Hi there,

I'm new to (PHP)TAL and now encountered a problem I can't solve:

I'd like to expand an elements attribute list with a number of 
additional and dynamic entries
   
    <element attr1="value" />

tal:attributes allowes me to replace existing (and therefore known) 
attributes. I'm dealing with not existing and not predefined or known 
attributes. I'd need something like

    <element tal:attributes="data/newattributes" />

where

    data->attributes->a1="v1"
    data->attributes->a2="v2"

resulting in

    <element a1="v1" a2="v2" />

Is there any chance to do so?


Thanks in advance,
Stefan.



More information about the PHPTAL mailing list