[PHPTAL] Weird behavior with the structure in attributes

Levi Stanley levi at eneservices.com
Thu Sep 14 07:25:01 CEST 2006


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.

Best regards,

Levi



More information about the PHPTAL mailing list