Go to main content

If last article




The if_last_article 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 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.


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


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

        <txp:title />
    <txp:posted />
    <txp:author />

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

    <img src="https://example.com/footer.jpg" alt="Footer">

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

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. :)