Project

General

Profile

Actions

Bug #83263

closed

Else with conditional does not behave as expected

Added by Stephan Rodemeier almost 7 years ago. Updated almost 7 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2017-12-08
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
Is Regression:
Sprint Focus:

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>
Actions

Also available in: Atom PDF