typo3 - Fluid image with extra data for cycle2 -
i'm using cycle2 image slider, adding title data needed in image url, want generate following url:
<img src="foto.jpg" data-cycle-title="title" data-cycle-desc="subtitle" />
i tried following generates error?
<f:image src="foto.jpg" data-cycle-title="title" data-cycle-desc="subtitle" />
since data-cycle-title
, data-cicle-desc
not registered arguments within imageviewhelper
cant pass values directly. there additionalattributes
argument rescue. can add many attributes have in image tag. additionalattributes
expects array notation:
<f:image ... additionalattributes="{data-cycle-title: 'title', data-cycle-desc: 'subtitle'}" ... />
Comments
Post a Comment