You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tags/category2.md
+19-23Lines changed: 19 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ layout: document
3
3
category: Tags
4
4
published: true
5
5
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.
7
7
tags:
8
8
- Article tags
9
9
- Navigation tags
@@ -22,13 +22,13 @@ tags:
22
22
<txp:category2 />
23
23
~~~
24
24
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.
26
26
27
27
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.
28
28
29
29
## Attributes
30
30
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 %}:
32
32
33
33
`link="boolean"`
34
34
: 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**):
50
50
: **Values:**`0` (no, allow from any section) or `1` (yes).
51
51
: **Default:**`0`.
52
52
53
-
### Common presentational attributes
54
-
55
-
These attributes, which affect presentation, are shared by many tags. Note that default values can vary among tags.
: 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
-
65
53
## Examples
66
54
67
55
### Example 1: Category name in plain text
@@ -76,28 +64,36 @@ These attributes, which affect presentation, are shared by many tags. Note that
76
64
77
65
~~~html
78
66
<p>
79
-
<txp:category2link="1"title="1" />
67
+
<txp:category2linktitle />
80
68
</p>
81
69
~~~
82
70
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
84
74
85
-
### Example 3: Container example
75
+
~~~html
76
+
<txp:category2wraptag="p">Other articles in category:
0 commit comments