Difference between revisions of "User:Rasarr/Infobox Test"

From The Coppermind
Jump to navigation Jump to search
Line 31: Line 31:
 
|param=cat
 
|param=cat
 
|desc=Use this to add this page to a category named differently than the first parameter; if <code>cat</code> is used, the first parameter serves only as a page link.<br>
 
|desc=Use this to add this page to a category named differently than the first parameter; if <code>cat</code> is used, the first parameter serves only as a page link.<br>
<small>'''Note:''' This is useful in cases such as when the first parameter links to a disambiguation page; for example, <nowiki>{{tag|Diagram}}</nowiki> would add the page to [[:Category:Diagram]] and link to [[Diagram]], while <nowiki>{{tag|Diagram (group)|cat=Diagram}}</nowiki> adds the page to [[:Category:Diagram]] and links to [[Diagram (group)]]</small>
+
<small>'''Note:''' This is useful in cases such as when the first parameter links to a disambiguation page; for example, <nowiki>{{tag|Diagram}}</nowiki> would add the page to [[:Category:Diagram]] and link to [[Diagram]], while <nowiki>{{tag|Diagram (group)|cat=Diagram}}</nowiki> adds the page to [[:Category:Diagram]] and links to [[Diagram (group)]].</small>
 
|eg=
 
|eg=
 
<code><nowiki>|cat=Diagram</nowiki></code>
 
<code><nowiki>|cat=Diagram</nowiki></code>

Revision as of 13:36, 8 December 2019

To Template:Tag

The tag template links to a page, and adds the page it's on to a category.

Template

{{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".

{{Tag}} Parameters
Parameter Description Examples
{{1}} Use the first parameter to create a link and add the page to a category with the same name.

|Diagram

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, {{tag|Diagram}} would add the page to Category:Diagram and link to Diagram, while {{tag|Diagram (group)|cat=Diagram}} adds the page to Category:Diagram and links to Diagram (group).

|cat=Diagram

text Use this to change how the tag is displayed on the page.

Note: To follow from the above example, {{tag|Diagram (group)|cat=Diagram|text=Patriots}} adds the page to Category:Diagram, links to Diagram (group) and displays the tag as Patriots.

|text=Patriots

Categories & Tags

Pages that make use of the {{tag}} template will be added to the category indicated by the tag.