[PHPTAL] problem with attributes

Joaco joaco182 at hotmail.com
Wed Jul 26 17:01:41 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

if you can access public methods using phptal syntax, is it also possible
to pass parameters to these methods, or are empty lists the only supported
mechanism. (Is this just an attempt to support the private member recommendation
when creating classes and using accessors/mutators for access?)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.motion-twin.com/pipermail/phptal/attachments/20060726/6f47d6f5/attachment.htm


More information about the PHPTAL mailing list