Is there an inline notation for the following example?
<f:if condition="{value}==1">
    <f:then>Value is 1</f:then>
    <f:else if="{value}==2">Value is 2</f:else>
</f:if>
Thanks for your help
Is there an inline notation for the following example?
<f:if condition="{value}==1">
    <f:then>Value is 1</f:then>
    <f:else if="{value}==2">Value is 2</f:else>
</f:if>
Thanks for your help
probably it will be the cascading of if-viewhelpers:
{f:if(condition:'{value}==1', 
    then:'Value is 1', 
    else:'{f:if(condition:\'{value}=2\', then:\'Value is 2\')}'
)}
with the usual drawback of escaping string-delimiter for stacked inline viewhelpers.
your condition will default to 'Value is 2' although the value might not be ... this is not true, anyhow a bit more complete:
<f:if condition="{value}==1">
  <f:then>Value is 1</f:then>
  <f:else if="{value}==2">Value is 2</f:else>
  <f:else>Value is not valid</f:else>
</f:if>
simple inline annotation that does not output anything if the two conditions are not met:
{f:if(condition:'{value}==1',
  then: 'Value is 1',
  else: '{f:if(condition:\'{value}==2\',then: \'Value is 2\')}'
)}
add the else clause in the second condition:
{f:if(condition:'{value}==1',
  then: 'Value is 1',
  else: '{f:if(condition:\'{value}==2\',
    then: \'Value is 2\',
    else: \'Value is not valid\'
  )}'
)}