Skip to content

Instantly share code, notes, and snippets.

@anova
Created September 18, 2013 06:51
Show Gist options
  • Save anova/6605426 to your computer and use it in GitHub Desktop.
Save anova/6605426 to your computer and use it in GitHub Desktop.
phptal multiple if priority issue solved with brackets.
<h1 tal:attributes="class php:repeat.current_item.number == 1 ? 'one'
: (repeat.current_item.number == 2 ? 'two'
: (repeat.current_item.number == 3 ? 'three' : NULL))"
tal:content="repeat/current_item/number"
tal:repeat="repeat_item collection"></h1>
<!-- collection bind from php code -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment