The category1 tag can be used as either a single or containing tag. It will display information of the category as defined by Cat1 of the article being displayed. When used as a containing tag, it will turn the contents into a link to that category. Otherwise, it will return plain text.
This tag may be used within either an article Form, or, in a page, wrapped in an if_individual_article conditional tag.
The category1 tag has the following syntactic structure…
<txp:category1 />
Tag will accept the following attributes ('case-sensitive'):
Whether to output category title, rather than name. Available values: 1 (yes) or 0 (no, output name). Default is 0 (no).
Whether to link to articles from the same category. Available values: 1 (yes) or 0 (no). Default is 0 (no).
Only link to articles from the specified section. Default is unset.
Whether to only link to articles from the section containing the current article. Available values: 1 (yes) or 0 (no). Default is 0 (no, allow from any section).
(X)HTML class attribute to be applied to wraptag. Default is unset.
(X)HTML tag (without brackets) to wrap around output. Default is unset.
<txp:category1 />
<txp:category1 link="1" />
If category1 is “General”, this tag returns the following URL
http://yoursite.com/category/general
If you find you have URL mode or version conflicts with this, what follows will serve as well.
<a href="/subdirectory/index.php?c=<txp:category1 />"><txp:category1 /></a>