If article list

On this page:



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

    …conditional statement…

The tag will execute the contained statement if an article list is being displayed (i.e. not showing an individual article).


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

type="list" v4.7.0+
Check whether some of Textpattern’s filters are set.
Values: a comma-separated list of author, c, context, month, pg, q, s.
Default: unset.


Example 1: Article/article list navigation

<txp:article />

            <txp:prev_title />
            <txp:next_title />


This example shows how to setup article navigation so that link_to_prev and link_to_next are used at the individual article level or older and newer with article lists.

Other tags used: link_to_prev, link_to_next, prev_title, next_title, if_individual_article, older, newer.

Example 2: In combination with the ‘else’ tag

        <txp:site_name />
<txp:else />
        <img src="https://example.com/logo.png" alt="Logo">

This example shows the if_article_list in combination with else to display a site’s site_name or logo when an article list is displayed or not, respectively.

Other tags used: else, site_name.


Version 4.7.0

type attribute added.

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