On this page:
The if_description tag is a conditional tag and always used as an opening and closing pair, like this…
<txp:if_description> ...conditional statement... </txp:if_description>
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):
- Textpattern context to check against. You can choose from the following contexts (set to empty to include all contexts):
articleis this an article author list?
imageis this an image author list?
fileis this a file author list?
linkis this a link author list?
Example 1: Supply meta tag if description exists
<head> .... <txp:if_description> <txp:meta_description /> <txp:else /> <meta name="description" content="A generic description fallback, possibly about bacon." /> </txp:if_description> .... </head>
Tag support added