We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 51415
    • 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:
      title="[[+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.]
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org