Page url

On this page:


<txp:page_url />

The page_url tag is a single tag that is used to return a particular component of the URL from the current page being displayed.


Tag will accept the following attributes (case-sensitive):

Specifies which component of the current page’s URL will be returned.
request_uri: current article’s URL-title including any query string.
id: current article’s id on a single article page.
s: current page’s section.
c: current page’s category.
q: search query string.
pg: current page number in article list mode.
month: current page’s month on time based article lists.
author: current page’s author on article lists filtered by author.
status: HTTP error response (200, 404).
css: current style sheet name.
page: current page template name.
Default: request_uri.


Example 1: Show the current article’s ID, HTTP status and section

    Article ID:
    <txp:page_url type="id" />,
    From section:
    <txp:page_url type="s" />
    (Result: <txp:page_url type="status" />)

This would result in the following, for example:

    Article ID:
    From section:
    Tasty pea recipes
    (Result: 200)

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.