section
From Textbook
<txp:section>
The section tag can be used as either a single tag or container tag. It will display information about the section as defined by either the name attribute, the section currently being viewed, or the section of the article being displayed (if used within an article form, or an if_individual_article conditional tag).
When used as a containing tag, it will turn the contents into a link to that section. Otherwise, it will return plain text.
Contents |
Attributes
Tag will accept the following attributes (case-sensitive):
- title="boolean"
- Display either the section name or its title.
- Values:
0or1 - Default:
0(name) - link="boolean"
- Display as plain text or a link.
- Values:
0or1 - Default:
0(plain text) - wraptag="tag"
- HTML tag name to be used as the wraptag, without brackets.
- Default: unset.
- class="class name"
- CSS class name to apply to the
wraptag. If no wraptag is supplied (andlink="1"), the class is applied to the anchor instead. - Default: unset.
- name="section name"
- Sets the link to the named section.
- Default: unset (sets the link to the current section)
- url="boolean"
- Display plain URL or full link.
- Values:
0or1 - Default:
0(display title or full link, depending onlink)
Examples
Example 1: Display the current section name
<txp:section />
Example 2: Display hyperlinked section title
<txp:section link="1" title="1" />
- What this does...
- In an article form, it displays the article's section title as a hyperlink to the section home page.
- Otherwise, it displays the title of the section currently being viewed as a hyperlink to the section home page.
Example 3: Display a link to a specified section
<txp:section link="1" title="1" wraptag="p" name="archive" />
- What this does...
- It displays a hyperlink to the 'archive' section home page, wrapped in
<p>tags, using the section's title as link text.
Example 4: Container example
<txp:section name="archive">My Archive</txp:section>
- What this does...
- It displays the text "My Archive" as a hyperlink to the 'archive' section home page.
Genealogy
Version 4.0.7
- Applies
classattribute to the<a>element whenwraptagis empty. - New attribute,
urlto output URL only.




