How do I link an image to another topic in a publication?

Would you please help us in understanding how to link a thumbnail to a larger version of the image in another topic? 

We would like to provide images as thumbnails, so that when users click the thumbnail, they are shown a larger version of that image in another topic. We tried highlighting the <image> elements for the thumbnail and then inserting an xref to the larger image. This way the <xref> element surrounded the <image> element, for example <xref><image></image></xref>. The cross-reference worked in the preview pane in Tridion Docs Publication Manager, but it did not work in the HTML output. 

In the HTML output, the image appeared after the xref, as shown in the following screen shot:

emoji
Parents
  • Hi Christina, this is just an opinion as a past DITA author/trainer rather than in my official capacity here:

    Wrapping the image in the xref as you mentioned, does seem to be the semantically correct way to tag a clickable image. It fits the DITA content model and I found a discussion on another forum that suggested this would be the way.

    Of course it's always worth double- and triple-checking your markup.

    But it could also be that the DITA-OT is not set up to handle the exact structure you're using. Can you try putting the same hyperlinked image in a different container element such as <example> or <abstract>, not a table? If it works there, at least that isolates the problem a bit.

    emoji
Reply
  • Hi Christina, this is just an opinion as a past DITA author/trainer rather than in my official capacity here:

    Wrapping the image in the xref as you mentioned, does seem to be the semantically correct way to tag a clickable image. It fits the DITA content model and I found a discussion on another forum that suggested this would be the way.

    Of course it's always worth double- and triple-checking your markup.

    But it could also be that the DITA-OT is not set up to handle the exact structure you're using. Can you try putting the same hyperlinked image in a different container element such as <example> or <abstract>, not a table? If it works there, at least that isolates the problem a bit.

    emoji
Children