i use this condition in my fluid template:
<f:if condition="{settings.image.className} == 'lightbox'">
<f:then>
....do something
</f:then>
<f:else>
<f:if condition="{settings.image.className} !== 'lightbox'">
<f:then>
....do something else
</f:then>
</f:if>
</f:else>
It works fine but if $settings.image.className" is something like "lightbox container" instead of just "lightbox" it does not work of course. Unfortunately i do not know how write a condtion that checks if $settings.image.className contains "lightbox" or not.
The only instructions i found are here: ViewHelper Reference .However i do not know how to apply that.
add this to the top of the partial/content Element
{namespace v=FluidTYPO3\Vhs\ViewHelpers}
and change the logic like this
<v:condition.string.contains haystack="{settings.image.className}" needle="lightbox">
<f:then>
....do something
</f:then>
<f:else>
....do something else
</f:else>
</v:condition.string.contains>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With