Template:Tag: Difference between revisions

From WikiIndex
Jump to navigation Jump to search
(Shorten)
(Clarify description and usage)
Line 1: Line 1:
<includeonly><nowiki />[[Category:{{{1}}}]][[:Category:{{{1}}}|<span title="This page is tagged as "{{{1}}}".">{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}</span>]]</includeonly><noinclude>
[[Category:{{{1}}}]][[:Category:{{{1}}}|<span title="This page is tagged as "{{{1}}}".">{{#if: {{{2|}}}|{{{2}}}|{{{1}}}}}</span>]]<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.


;Usage
----
*Category (Japan) and linkname (Japan) same: <code><nowiki>{{tag|Japan}}</nowiki></code> – would display: [[:Category:Japan|Japan]]
{{TOC right}}
*Category (Japan) and linkname (Japanese) different: <code><nowiki>{{tag|Japan|Japanese}}</nowiki></code> – would display: [[:Category:Japan|Japanese]]
This <big>'''tag'''</big> [[Special:Templates|template]] here on WikiIndex has <u>two</u> specific purposes, and both purposes will be resulted:


Hover your mouse pointer over both above blue links to see the actual link-target.
#it facilitates the creation of a wikilink to a [[Special:Categories|category]] within the {{Cambridge-Dictionary|prose}} text of an article (or another [[category]] page) – which not only links (like a conventional [[wikilink]]) to the linked category;
#and <u>it also</u> auto-includes the article (or other category) into <u>that</u> linked category.


See [[WikiIndex:How do categories work]] for more information on how tags work in general with categories.
===Usage===
Hover your mouse pointer over both below blue link examples to see the actual link-target.
====Basic example====
*Category (Japan) and the displayed wikilink (Japan) are the same: <code><nowiki>{{tag|Japan}}</nowiki></code> – would display: [[:Category:Japan|Japan]]
 
====Displayed output different from input====
*Category (Japan) and the displayed wikilink (Japanese) are different: <code><nowiki>{{tag|Japan|Japanese}}</nowiki></code> – would display: [[:Category:Japan|Japanese]]
 
See [[WikiIndex: How do categories work]] for more information on how tags work in general with categories here on WikiIndex.


[[Category:Category templates]]</noinclude>
[[Category:Category templates]]</noinclude>

Revision as of 00:55, 13 August 2023

[[Category:{{{1}}}]][[:Category:{{{1}}}|{{{1}}}]]


This tag template here on WikiIndex has two specific purposes, and both purposes will be resulted:

  1. it facilitates the creation of a wikilink to a category within the prose text of an article (or another category page) – which not only links (like a conventional wikilink) to the linked category;
  2. and it also auto-includes the article (or other category) into that linked category.

Usage

Hover your mouse pointer over both below blue link examples to see the actual link-target.

Basic example

  • Category (Japan) and the displayed wikilink (Japan) are the same: {{tag|Japan}} – would display: Japan

Displayed output different from input

  • Category (Japan) and the displayed wikilink (Japanese) are different: {{tag|Japan|Japanese}} – would display: Japanese

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