Issue Bug Rejected

#83263Else with conditional does not behave as expected

Stephan Rodemeier 12/08/17, 16:25 updated 12/11/17, 20:17

Description

In the following code, the condition of the else seems to be ignored and the contents are always displayed.

<f:if condition="{p -> f:count()} == 1">
  <f:then>
    <f:render section='singleTable'/>
  </f:then>
  <f:else if="{p -> f:count()} > 1">
    <f:render section='multiTable'/>
  </f:else>
</f:if>

Adding an empty else fixes the issue.

<f:if condition="{p -> f:count()} == 1">
  <f:then>
    <f:render section='singleTable'/>
  </f:then>
  <f:else if="{p -> f:count()} > 1">
    <f:render section='multiTable'/>
  </f:else>
  <f:else></f:else>
</f:if>

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.