Difference between revisions of "Template:Tag"

From WikiIndex
Jump to: navigation, search
m
(Shorten)
(17 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<includeonly>[[:Category:{{{1}}}|<span title="This page is tagged as "{{{1}}}".">{{#if: {{{2}}}|{{{2}}}|{{{1}}}}}</span>]][[Category:{{{1}}}]]</includeonly><noinclude>
+
<includeonly><nowiki />[[Category:{{{1}}}]][[:Category:{{{1}}}|<span title="This page is tagged as "{{{1}}}".">{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}</span>]]</includeonly><noinclude>
 +
This '''tag''' [[:Category:Category templates|template]] facilitates the creation of a wikilink to a [[Special:Categories|category]] within the prose text of an article (or another category) – which not only links to the linked category, but also auto-includes the article into that linked category.
  
==Description==
+
;Usage
* category (japan) and linkname (japan) same: <nowiki>{{tag|japan}}</nowiki>
+
*Category (Japan) and linkname (Japan) same: <code><nowiki>{{tag|Japan}}</nowiki></code> – would display: [[:Category:Japan|Japan]]
* category (japan) and linkname (japanese) different: <nowiki>{{tag|japan|japanese}}</nowiki>
+
*Category (Japan) and linkname (Japanese) different: <code><nowiki>{{tag|Japan|Japanese}}</nowiki></code> – would display: [[:Category:Japan|Japanese]]
</noinclude>
+
 
 +
Hover your mouse pointer over both above blue links to see the actual link-target.
 +
 
 +
See [[WikiIndex:How do categories work]] for more information on how tags work in general with categories.
 +
 
 +
[[Category:Category templates]]</noinclude>

Revision as of 07:53, 21 April 2013

This tag template facilitates the creation of a wikilink to a category within the prose text of an article (or another category) – which not only links to the linked category, but also auto-includes the article into that linked category.

Usage
  • Category (Japan) and linkname (Japan) same: {{tag|Japan}} – would display: Japan
  • Category (Japan) and linkname (Japanese) different: {{tag|Japan|Japanese}} – would display: Japanese

Hover your mouse pointer over both above blue links to see the actual link-target.

See WikiIndex:How do categories work for more information on how tags work in general with categories.