Skip to content

Commit 212a864

Browse files
authored
Update category2.md
1 parent 447026d commit 212a864

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

tags/category2.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ layout: document
33
category: Tags
44
published: true
55
title: Category2
6-
description: The category2 tag will display information of the category as defined by 'Category 2' of the article being displayed.
6+
description: The category2 tag will display the category as defined by 'Category 2' in the article being displayed.
77
tags:
88
- Article tags
99
- Navigation tags
@@ -22,13 +22,13 @@ tags:
2222
<txp:category2 />
2323
~~~
2424

25-
The **category2** tag can be used as either a *single* tag or *container* tag. It will display information of the category as defined by **Category 2** 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.
25+
The **category2** tag can be used as either a *single* tag or *container* tag. It will display the category as defined by **Category 2** in the article being displayed. When used as a container tag, it will turn the contents into a link to that category. Otherwise, it will return plain text.
2626

2727
This tag may be used within either an article form, or in a page, wrapped in an [if_individual_article](/tags/if_individual_article) conditional tag.
2828

2929
## Attributes
3030

31-
Tag will accept the following attributes (**case-sensitive**):
31+
Tag will accept the following attributes (**case-sensitive**) as well as the {% include atts-global-link.html %}:
3232

3333
`link="boolean"`
3434
: Whether to link to articles from the same category. Works only in the *single* tag.
@@ -50,18 +50,6 @@ Tag will accept the following attributes (**case-sensitive**):
5050
: **Values:** `0` (no, allow from any section) or `1` (yes).
5151
: **Default:** `0`.
5252

53-
### Common presentational attributes
54-
55-
These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.
56-
57-
`class="class name"` <span class="footnote warning">v4.0.4+</span>
58-
: HTML `class attribute` to be applied to `wraptag`.
59-
: **Default:** unset (see [class cross-reference](/tags/tag-attributes-cross-reference#class)).
60-
61-
`wraptag="tag"` <span class="footnote warning">v4.0.4+</span>
62-
: HTML tag to wrap around output, specified without brackets (e.g. `wraptag="p"`).
63-
: **Default:** unset (but see [wraptag cross-reference](/tags/tag-attributes-cross-reference#wraptag) for exceptions).
64-
6553
## Examples
6654

6755
### Example 1: Category name in plain text
@@ -76,28 +64,36 @@ These attributes, which affect presentation, are shared by many tags. Note that
7664

7765
~~~ html
7866
<p>
79-
<txp:category2 link="1" title="1" />
67+
<txp:category2 link title />
8068
</p>
8169
~~~
8270

83-
If **category2** is 'Specific stuff', this tag will display the words 'Specific stuff' as a hyperlink to a list of articles in the same category.
71+
If **category2** is defined with a title 'Security advice', this tag will display the words 'Security advice' as a hyperlink to a list of articles in the same category.
72+
73+
### Example 3: Category link using custom container content
8474

85-
### Example 3: Container example
75+
~~~ html
76+
<txp:category2 wraptag="p">Other articles in category:
77+
<txp:category2 title /></txp:category2>
78+
~~~
79+
80+
Might display this HTML:
8681

8782
~~~ html
8883
<p>
89-
<txp:category2>Other articles in category:
90-
<txp:category2 title="1" /></txp:category2>
91-
</p>
84+
<a rel="tag" href="https://example.com/category/security-advice/">
85+
Other articles in category: Security advice
86+
</a>
87+
<p>
9288
~~~
9389

9490
### Example 4: Category 1 and 2
9591

9692
~~~ html
9793
<p>
98-
Filed in: <txp:category1 link="1" title="1" />
94+
Filed in: <txp:category1 link title />
9995
<txp:if_article_category number="2">
100-
and <txp:category2 link="1" title="1" />
96+
and <txp:category2 link title />
10197
</txp:if_article_category>
10298
</p>
10399
~~~

0 commit comments

Comments
 (0)