<txp:if_article_section /> container tag, 1 attributes


The if_article_section 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 section name associated with a particular article matches the value of the name attribute. Should be used in an article form.


  • Comma-separated list of section names.
<txp:if_article_section /> 2 examples

Check the article’s section

<txp:if_article_section name="Poetry">
<p>by <txp:author /></p>

What this does…
Displays the author name if the current article belongs to the section named Poetry.

Other tags used: author

Using the tag with else

<txp:if_article_section name="Poetry">
<p>Fun With Poetry</p>
<txp:else />
<p><a href="index.php">Home</a></p>

What this does…
Display the welcome text if the article’s section matches Poetry, or shows a default link otherwise.

Other tags used: else