[PHPTAL] problem with attributes

tarjei tarjei at nu.no
Wed Jul 26 12:53:45 CEST 2006


Anselmo Battisti wrote:
> hi
>
> i am new user of phptal i have this
>
> <div tal:content="structure msg" >aaa</div>
>
> and  need to change the atribute class for this DIV, read about 
> tal:attribute but  didn't find a example who work. "except on in 
> polsky i supose but i didn't undertand :)".
>
> Somebody can send an example php an html
Not in php but in phptal :-)

Lets say you added an object style with a method getClass to the template.
$template->set('style', $style);
Then you do:

<div tal:attributes="class style/getClass" >aaa</div>

Tarjei

>
> Thanks for help
> []'s Anselmo Battisti
>
>
> "A única forma de expressão que não pode ser censurada é o pensamento. 
> Pense e seja livre! - 'Anselmo' "
> "De pau em pau o Sistema um dia fica pronto! - 'Anselmo'"
>
> ----------------------------------------------------------------------
> Anselmo Battisti
> Cascavel - Paraná - Brasil
> Unioeste - Informática
> www : http://www.inf.unioeste.br/~alebattisti
> www2 : http://battisti.wordpress.com/
> msn : anselmobattisti at hotmail.com
> usuário do linux número 415222
> ----------------------------------------------------------------------
>
> ------------------------------------------------------------------------
> Yahoo! Search
> Música para ver e ouvir: You're Beautiful, do James Blunt 
> <http://us.rd.yahoo.com/mail/br/tagline/search/video/*http://br.search.yahoo.com/search/video?p=james+blunt&ei=UTF-8&cv=g&x=wrt&vm=r&fr=intl-mail-br-b> 
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
>   




More information about the PHPTAL mailing list