[PHPTAL] tal:repeat and php:
Dominique Sandoz
jeko at gmx.ch
Sun May 24 12:13:00 CEST 2009
Hello all,
I'm searching/experimenting since hours, but I finally end up with nothing.
I'm trying to use tal:repeat-Variables inside a php:-Condition, but
everytime I do so, I got an error, that the variable is not defined.
Here's my PHP-Array:
---
$storeBoxes = array(
array('nr'=>3, 'name'=>'foo')
);
---
And my phptal:
---
<ul class="storeBoxes">
<li tal:repeat="box storeBoxes" class="storeBox">
<strong tal:condition="php:${box/nr} > 5"
tal:content="string:${box/name} ${repeat/box/number}">
gewählte Box #
</strong>
</li>
</ul>
---
But all I get is, that nr is not defined (i tried to output it with
tal:content and it worked...
Can anyone help?
greetings
dominique
More information about the PHPTAL
mailing list