Re: [PHPTAL] Compose an HTML attribute using static text + dynamic text

2009-09-15 Thread Kornel Lesiński


On 13.09.2009, at 12:09, Mariano Calandra wrote:


Hi.
I have an HTML tag that i need to specify with ID attribute, I would  
this attribute as name_1, name_2 and so on.

Actually writing:

span tal:attributes=id person/id_name some text /span

I resolve partially my problem cause I just have 1, 2. How can i  
prepone the static text name_ to the dynamic text from person/ 
id_name???


span id=name_${person/id_name}

or

 tal:attributes=id php:'name' . person['id_name']  (assuming  
person is an array)


--
regards, Kornel




___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


[PHPTAL] Compose an HTML attribute using static text + dynamic text

2009-09-13 Thread Mariano Calandra
Hi.
I have an HTML tag that i need to specify with ID attribute, I would this
attribute as name_1, name_2 and so on.
Actually writing:

span tal:attributes=id person/id_name some text /span

I resolve partially my problem cause I just have 1, 2. How can i prepone the
static text name_ to the dynamic text from person/id_name???

Regards.
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal


Re: [PHPTAL] Compose an HTML attribute using static text + dynamic text

2009-09-13 Thread Michał Wysoczański
Hi,

On Sun, Sep 13, 2009 at 1:09 PM, Mariano Calandra 
mariano.calan...@gmail.com wrote:

 span tal:attributes=id person/id_name some text /span

 I resolve partially my problem cause I just have 1, 2. How can i prepone
 the static text name_ to the dynamic text from person/id_name???


Try something like that:

span id=name_${person/id_name}some text/span

Regards,
Michał
___
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal