Difference between revisions of "Template:Tag"
m |
|||
Line 6: | Line 6: | ||
-->[[Category:{{{cat|{{{1}}}|}}}]]<!-- |
-->[[Category:{{{cat|{{{1}}}|}}}]]<!-- |
||
+ | --></includeonly><noinclude> |
||
− | + | The '''tag''' template is a link macro template that links to a page and applies a category. It's best to use it on the page's [[Help:Infoboxes|infobox]] rather than in the text proper. |
|
=== Template === |
=== Template === |
||
+ | <small>'''Note:''' Replace <code><nowiki>{{1}}</nowiki></code> with an actual parameter.</small> |
||
<pre class=mw-code> |
<pre class=mw-code> |
||
{{tag |{{1}} |cat= |text= }} |
{{tag |{{1}} |cat= |text= }} |
Revision as of 21:03, 8 December 2019
The tag template is a link macro template that links to a page and applies a category. It's best to use it on the page's infobox rather than in the text proper.
Template
Note: Replace {{1}}
with an actual parameter.
{{tag |{{1}} |cat= |text= }}
Parameters
Highlighted lines indicate mandatory parameters.
Positional parameters are indicated with {{N}} in their name. For example, {{1}} means "the first template parameter".
Parameter | Description | Examples |
---|---|---|
{{1}}
|
Use the first parameter to create a link and add the page to a category with the same name. |
|
cat
|
Use this to add this page to a category named differently than the first parameter; if cat is used, the first parameter serves only as a page link.Note: This is useful in cases such as when the first parameter links to a disambiguation page; for example, |
|
text
|
Use this to change how the tag is displayed on the page. Note: To follow from the above example, |
|