Hi, this snippet of my template:

<tal:block tal:repeat="event_name php: array('pass', 'set', 'attack', 'block')">
           <tal:block tal:condition="php: isset(row.$team.$event_name)">
<td tal:define="event php: row.$team.$event_name" tal:attributes="style 'THIS DOESNT WORKS'">
                   <img src="/img/faces/${event/player/face_id}.png"/>
                   ${event/player/surname}
               </td>
           </tal:block>
</tal:block>

tal:attributes in <td> block doesn't work, no matter what i type there (php: 'style' too doesn't works). I have an error:


*Parse error*: syntax error, unexpected T_IF in */tmp/tpl_1251820757_1_1_16match_report_ht74491abc75696cbbff9436f9144f257f.php* on line *58*


This is that fragment of content of that tmp template:


<?php if (isset($ctx->row->{$ctx->team}->{$ctx->event_name})):  ?>
<?php $ctx = $tpl->pushContext() ;
$ctx->event = $ctx->row->{$ctx->team}->{$ctx->event_name}if (NULL !== 
($__ATT_style = ('TUTAJ SIE GAP'))):  ;
$__ATT_style = ' style="'.phptal_escape($__ATT_style, ENT_QUOTES, 'UTF-8').'"' ;
else:  ;
$__ATT_style = '' ;
endif ;
?><td<?php echo $__ATT_style ?>>
                                        <img src="/img/faces/<?php echo 
phptal_escape(phptal_path($ctx->event, 'player/face_id', true), ENT_QUOTES, 'UTF-8');?>.png 
<view-source:http://e-siatkarze.estender.net/img/faces/%3C?php%20echo%20phptal_escape%28phptal_path%28$ctx-%3Eevent,%20%27player/face_id%27,%20true%29,%20ENT_QUOTES,%20%27UTF-8%27%29;?%3E.png>"/>
                                        <?php echo 
phptal_escape(phptal_path($ctx->event, 'player/surname', true), ENT_QUOTES, 
'UTF-8');?>
                                </td><?php $ctx = $tpl->popContext(); ?>
                        <?php endif; ?>


Why it doesn't works?


Cheers!
Szymek

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

Reply via email to