Go to main content

If last image

Contents

Syntax

<txp:if_last_image>

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

<txp:if_last_image>
    …conditional statement…
</txp:if_last_image>

The tag will execute the contained statements if the displayed image is the last in the currently displayed images list. The tag supports else.

Attributes

This tag has no attributes of its own. It accepts only the global attributes .

Examples

Example 1: Identify last image in an image list

<txp:images break="" wraptag="ul" sort="date desc">
    <txp:if_last_image>
        <li class="earliest">
            <txp:image /> (Earliest photo)
        </li>
    <txp:else />
        <li>
            <txp:image />
        </li>
    </txp:if_last_image>
</txp:images>

Other tags used: else, image, images.

Genealogy

Version 4.6.0

Tag support added.

If you notice any kind of problem with this page’s construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)