typo3 - Fluid condition with ContainsViewHelper -
i use condition in fluid template:
<f:if condition="{settings.image.classname} == 'lightbox'"> <f:then> ....do </f:then> <f:else> <f:if condition="{settings.image.classname} !== 'lightbox'"> <f:then> ....do else </f:then> </f:if> </f:else>
it works fine if $settings.image.classname" "lightbox container" instead of "lightbox" not work of course. unfortunately not know how write condtion checks if $settings.image.classname contains "lightbox" or not.
the instructions found here: viewhelper reference .however not know how apply that.
add top of partial/content element
{namespace v=fluidtypo3\vhs\viewhelpers}
and change logic this
<v:condition.string.contains haystack="{settings.image.classname}" needle="lightbox"> <f:then> ....do </f:then> <f:else> ....do else </f:else> </v:condition.string.contains>
Comments
Post a Comment