not possible.
You might do workarounds.
you can assign the needed value to a temporary variable. multiple possibilities:
- use
f:cycle
(only possible with few entries)
- use
ext:vhs
to create/assign the calculated value to a fluid-variable
- use
f:alias
to create a local fluid-variable inside your loop.
for the later two solutions you need the possibility to calculate, which is not given in fluid.
but you can use a typoscript viewhelper:
lib.calc = TEXT
lib.calc {
current = 1
prioriCalc = 1
}
and call it with {f:cObject(typoscriptObjectPath:'lib.calc',data:{iterator.index}+2)}
<f:for each="{facility.media}" as="media" iteration="iterator">
<f:alias map="{newIndex:'{f:cObject(typoscriptObjectPath:\'lib.calc\',data:\'{iterator.index}+2\')}'}">
<img src="..." data-lightbox-index="{newIndex}" />
</f:alias>
</f:for>