Go to main content

Article id

Contents

Syntax

<txp:article_id />

The article_id tag is a single tag which returns the numeric ID of the article being displayed. This number will also be reflected as a part of the article permanent URL if it has been chosen as the ‘Article URL pattern’ in the Preferences panel.

Attributes

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

Examples

Example 1: Hyperlinked to the article

<txp:permlink>
    <txp:article_id />
</txp:permlink>

Other tags used: permlink.

Example 2: Conditional use

This will only display the hyperlinked article ID when on an individual article page.

<txp:if_individual_article>
    Article ID:
    <txp:permlink>
        <txp:article_id />
    </txp:permlink>
</txp:if_individual_article>

Other tags used: if_individual_article, permlink.

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