Go to main content

Link category

Contents

Syntax

<txp:link_category />

The link_category tag is a single tag which returns the link category as text. This tag is used in Textpattern ‘link’ type Form templates or inside the linklist container tag to return information about the current link in a list of links.

Attributes

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

title="boolean"
Whether to display the category name or its title.
Values: 0 (name), or 1 (title).
Default: 0.

Common presentational attributes

These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.

class="class name"
HTML class to apply to the wraptag attribute value.
Default: unset (see class cross-reference).
label="text"
Label prepended to item.
Default: unset (but see label cross-reference for exceptions).
labeltag="element"
HTML element to wrap (markup) label, specified without brackets (e.g. labeltag="h3").
Default: unset.
wraptag="element"
HTML tag to wrap around category text, specified without brackets (e.g. wraptag="p").
Default: unset.

Examples

<a href="<txp:link_url />">
    <txp:link_name escape="html" />
</a> | <txp:link_category title="1" />

Other tags used: link_url, link_name.

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