-
- 1 Posts
Hello guys,
I am new to Modx and i need your help on something simple.
I have an image TV that outputs small category icons and i need to put a different title to each icon. I managed to put the same title on all the icons though the attributes of the image in the output options but how can i do it so each icon has its own title?
Thank you very much
I usually use a MIGX grid and use a full img tag to output the img tag and its attributes.
However, you can use a property with the TV tag and a placeholder [[+title]] in the "alt" field of the TV output options.
[[*imageTV? &alt=`Testing Alt`]]
will produce
<img src="assets/images/testing_image.jpg" alt="Testing Alt">
You can also use a placeholder in the Attributes field to get a title:
[[*imageTV? &alt=`Testing Alt` &title=`Testing Title`]]
<img src="assets/images/Amilie's Log Cabin.jpg" alt="Testing Alt" title="Testing Title">
[ed. note: sottwell last edited this post 8 years, 5 months ago.]