title: TYPO3 Fluid complex if conditions
body: <p>I am trying to write the following if condition in fluid but it is not working as I would hope.</p>
  
  <p><strong>Condition</strong>
  As part of a for loop I want to check if the item is the first one or 4th, 8th etc</p>
  
  <p>I would have thought the following would work but it display the code for every iteration.</p>
  
  <pre><code>&lt;f:if condition="{logoIterator.isFirst} || {logoIterator.cycle % 4} == 0"&gt;
  </code></pre>
  
  <p>I have managed to get it working with a nested if but it just feels wrong having the same section of code twice and also having the cycle check use a <code>&lt;f:else&gt;</code> instead of == 0</p>
  
  <pre><code>&lt;f:if condition="{logoIterator.isFirst}"&gt;
      &lt;f:then&gt;
          Do Something
      &lt;/f:then&gt;
      &lt;f:else&gt;
          &lt;f:if condition="{logoIterator.cycle} % 4"&gt;
              &lt;f:else&gt;
                  Do Something
              &lt;/f:else&gt;
          &lt;/f:if&gt;
      &lt;/f:else&gt;
  &lt;/f:if&gt;
  </code></pre>