Go to main content

If description




The if_description 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 the current article/section/category’s ‘Description’ field has an entry.


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

Textpattern context to check against. You can choose from the following contexts (set to empty to include all contexts):
article is this an article author list?
image is this an image author list?
file is this a file author list?
link is this a link author list?
Default: article.


Example 1: Supply meta tag if description exists

        <txp:meta_description />
    <txp:else />
        <meta name="description" content="A generic description fallback, possibly about bacon." />

Other tags used: else, meta_description.


Version 4.6.0

Tag support added

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