<txp:if_thumbnail /> container tag, 0 attributes


The if_thumbnail tag is a conditional tag and always used as an opening and closing pair, like this…

...conditional statement...

The tag will execute the contained statements if the current image (from an images) has a thumbnail assigned to it. Must always be used in an image context.


Version 4.3.0

  • tag introduced
<txp:if_thumbnail /> 1 examples

Only show a thumbnail if one exists

<txp:images author="neo" wraptag="div" class="author_gallery">
      <div><txp:thumbnail /></div>
   <txp:else />
      <div>No thumbnail</div>
   <txp:image_info />

What this does…
For each image uploaded by neo, display its thumbnail if it has one, or the text “No thumbnail” if it doesn’t. Add the caption beneath that using image_info.

Other tags used: images, else, image_info, thumbnail