[TYPO3-english] Nested if fluid viewhelper in inline notation
Sergio Catalá
scatala.enet at gmail.com
Tue May 14 14:49:52 CEST 2013
Is it possible to nest "if" fluid viewhelper in the inline notation?
I would like to select by default the salutation checkbox in this Fluid
template:
<f:form name="checkoutForm" object="{checkoutForm}"
action="{submitAction}" class="custom">
...........
<f:for each="{salutations}" as="salutationObject"
iteration="iterator">
<label for="salutation{salutationObject.uid}"
class="inline">
<f:form.radio
property="salutation"
value="{salutationObject.uid}"
checked="......"
id="salutation{salutationObject.uid}"
/>
{salutationObject.name}
</label>
</f:for>
</f:form>
Where:
checked="{f:if(condition: iterator.isFirst, then: 1, else:
{f:if(condition: '{salutation.uid} == {checkoutForm.salutation.uid}',
then: 1, else: 0)})}"
and salutation is an Object with two fields (uid and name).
Somehow, this is not working. Is my syntax wrong? Am I able to do this?
Thanks in advance,
Sergio
More information about the TYPO3-english
mailing list