if article list

From Textpattern CMS User Documentation

Revision as of 00:31, 27 September 2009 by Uli (Talk | contribs)
(diff) ←Older revision | Latest revision (diff) | Newer revision→ (diff)


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



This tag has no attributes.


Example 1: Article/Article List Navigation

This example shows how to setup article navigation so that prev-next is used at the individual article level or older-newer with article lists.

<txp:article />

	<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
	<txp:link_to_next><txp:next_title /></txp:link_to_next>


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

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.

     <p><txp:site_name /></p>
<txp:else />
     <p><img src="http://yoursite/yourlogo.jpg"></img></p>

Other tags used: else, site_name

Translations [?]