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

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -