Last active
May 8, 2019 08:54
-
-
Save alrnz/f96554782cd4b667a9a07f2ec841068c to your computer and use it in GitHub Desktop.
TYPO3 Fluid flexible counter/iterator (count not every step) #TYPO3 #Fluid
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div xmlns="http://www.w3.org/1999/xhtml" lang="en" | |
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers" | |
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers" | |
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"> | |
<div> | |
{namespace v=FluidTYPO3\Vhs\ViewHelpers} | |
<v:variable.set name="i" value="0" /> | |
<f:for each="{array}" as="elem" iteration="iterator"> | |
val: {i} <br> | |
<f:if condition="{elem.field}"> | |
<v:variable.set name="i" value="{v:math.sum(a: '{i}', b: '1')}" /> | |
</f:if> | |
</f:for> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment