Difference between revisions of "Template:Tag"

948 bytes added ,  10 months ago
m
no edit summary
m
m
 
(13 intermediate revisions by 3 users not shown)
<includeonly><span class="cm-tag {{{class|}}}"><!--
LINK
-->[[{{{link|{{{1}}}|}}}|{{{text|{{{1}}}|}}}]]<!--
 
CATEGORY
-->[[Category:{{cat ns|{{{cat|{{{1}}}|}}}]]}}<!--
 
--></span></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 [[Helphelp:Infoboxes infoboxes|infobox]] rather than in the text proper.
 
Note that the category will be suppressed on userpages for the sake of drafting articles without affecting readers, you can use [[Special:ExpandTemplates]] if you wish to test that proper categories are included before moving the draft to the mainspace.
 
=== Template ===
 
<!-- ------------- -->
<!-- ROW: {{1}} -->
<!-- ------------- -->
{{docs/row/required
|param=<nowiki>{{1}}</nowiki>
|desc= Use the first parameter to create a link and add the page to a category with the same name.
|eg=
<code><nowiki>|cat=Diagram</nowiki></code>
}}
 
<!-- -------- -->
<!-- ROW: link-->
<!-- -------- -->
{{docs/row/optional
|param=link
|desc=Use this to change which page the tag links to.<br>
<small>'''Note:''' To follow from the above example, <code><nowiki>{{tag|Diagram|link=Diagram (group)}}</nowiki></code> adds the page to [[:Category:Diagram]], links to [[Diagram (group)]] and displays the tag as [[Diagram (group)|Diagram]].</small>
|eg=
<code><nowiki>|link=Diagram (group)</nowiki></code>
}}
 
 
<!-- -------- -->
|}
 
[[Categorycategory: link macros]]
 
== Articles using Template ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages.}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}