[PHPTAL] Weird behavior with the structure in attributes

Levi Stanley levi at eneservices.com
Tue Sep 26 17:07:56 CEST 2006


Hi Klein Stephane:

Well what Laurent says to do for now, is to take out the tal:attributes 
and do something like this:

<a onMouseOver="${structure channel/onmouseover}" ...

He says he will add in support for the reserve word in the 
tal:attributes tag.

Hope that has been helpful.

Best regards,

Levi


KLEIN Stéphane wrote:
> 2006/9/14, Levi Stanley <levi at eneservices.com>:
>> I am getting this error:
>>
>> PHP Parse error:  syntax error, unexpected T_CONSTANT_ENCAPSED_STRING,
>> expecting T_STRING or T_VARIABLE or '{' or '$' in
>> /www/sites/____.com/cache/tpl_1_1_74130644086ba9d17308c8593cef4edbc.php
>> on line 181
>>
>> It is coming from this line in my template:
>>
>> <tr tal:repeat="channel channels">
>> <td width="132">
>> <a tal:attributes="onmouseover ${structure channel/onmouseover};
>> onmouseout ${structure channel/onmouseout}" href="#"><img
>> id="pTV_main_42" width="132" height="32" alt="" border="0"
>> tal:attributes="src channel/image"/>
>> </a>
>> </td>
>> </tr>
>>
>> This is the code in the cache that was generated:
>>
>> <tr><td width="132">
>> <?php
>> $__att_onmouseover = phptal_escape($ctx->'.phptal_path($ctx->structure
>> channel, 'onmouseover').', ENT_QUOTES, 'UTF-8') ;
>> $__att_onmouseout = phptal_escape($ctx->'.phptal_path($ctx->structure
>> channel, 'onmouseout').', ENT_QUOTES, 'UTF-8') ;
>> ?><a href="#" onmouseover="<?php echo $__att_onmouseover ?>"
>> onmouseout="<?php echo $__att_onmouseout ?>"><?php $__att_src =
>> phptal_escape(phptal_path($ctx->channel, 'image'), ENT_QUOTES, 'UTF-8');
>> ?><img id="pTV_main_42" src="<?php echo $__att_src ?>" width="132"
>> height="32" alt="" border="0"/></a></td>
>> </tr>
>>
>>
>> All I wanted to do is stop the encoding from happening on these items.
>> Did I implement it incorrectly?  Any assistance in this matter would be
>> greatly appreciated.
>>
>
> I've exactly same issue, are you found solution ?
>
> Thanks,
> Stephane
>
> !DSPAM:1,45193df5317443395937289!
>




More information about the PHPTAL mailing list