[TYPO3-mvc] How to use If-ViewHelper with other than true/false
Michel Tremblay
michel.tremblay at infoglobe.ca
Wed Jun 10 04:30:25 CEST 2009
Joerg Schoppet a écrit :
>
> These are exactly the two scenarios I have in mind:
> 1. table-row formatting
> 2. simple switching depending on the value of a radio-button
>
>
> Joerg
I would need string comparison to add style to the selected item in a menu.
<ul>
<f:for each="{categories}" as="category">
<f:link.action controller="Product" action="index" arguments="{category : category}">
<li <f:if condition="{category.uid} == {currentCat}">class="current"</f:if> >{category.name}</li>
</f:link.action>
</f:for>
</ul>
If there is a better way to do this, I opened to suggestions.
Michel
More information about the TYPO3-project-typo3v4mvc
mailing list