If last article

On this page:

Syntax

<txp:if_last_article>

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

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

The tag will execute the contained statements if the displayed article is the last in the currently displayed list. It will display in both single article and article list modes. Should be used in Textpattern ‘article’ type Form templates.

Attributes

This tag has no attributes.

Examples

Example 1: Add an image after the last article in a list

<h3>
    <txp:permlink>
        <txp:title />
    </txp:permlink>
    |
    <txp:posted />
    by
    <txp:author />
</h3>

<txp:body />
<txp:comments_invite wraptag="p" />

<txp:if_last_article>
    <img src="http://example.com/footer.jpg" alt="Footer">
</txp:if_last_article>

Other tags used: permlink, title, posted, author, body, comments_invite.

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.