If last link

On this page:

Syntax

<txp:if_last_link>

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

<txp:if_last_link>
    ...conditional statement...
</txp:if_last_link>

The tag will execute the contained statements if the displayed link is the last in the currently displayed linklist. The tag supports else.

Attributes

This tag has no attributes.

Examples

<txp:linklist break="" wraptag="ul" sort="date desc">
    <txp:if_last_link>
        <li class="earliest">
            <txp:link /> (My first link)
        </li>
    <txp:else />
        <li>
            <txp:link />
        </li>
    </txp:if_last_link>
</txp:linklist>

Other tags used: else, link, linklist.

Genealogy

Version 4.6.0

Tag support added.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please write an issue and we’ll fix it.