Anonymous
×
Create a new article
Write your page title here:
We currently have 205 articles on Shadowrun Seattle Shutdown. Type your article name above or click on one of the titles below and start writing!



Shadowrun Seattle Shutdown

Template:Category/Documentation: Difference between revisions

(Created page with "{{Template|Category}} is used to simplify the creation of links to categories. ==Usage== It accepts one {{parameter|mandatory|string}}, the name of an article in the category namespace. ==Return== It returns a link to the category page, without the namespace prepended. For instance, {{Code|<nowiki>{{Category|Admin}}</nowiki>}} returns: {{Return|{{Category|Admin}}}} This is in contrast to a normal Mediawiki category link, such as {{Code|<nowiki>Category:Admin</nowik...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>[[Category:Categorization Template]]</includeonly>
{{Template|Category}} is used to simplify the creation of links to categories.
{{Template|Category}} is used to simplify the creation of links to categories.
==Usage==
==Usage==
It accepts one {{parameter|mandatory|string}}, the name of an article in the category namespace.
It accepts one {{Parameter|mandatory|string}} and one {{Parameter|optional}}:
* {{Code|1}} is the name of an article in the category namespace.
* {{Code|2}}, can be arbitrary text, which will change the text presented by the link, or on eof three special options:
** {{Code|add}} adds the article to the same category it is linking to.
** {{Code|end}} adjusts the output, primarily for grammatical purposes.
** {{code|lc}} returns the first parameter, but in all lower case.
==Return==
==Return==
It returns a link to the category page, without the namespace prepended. For instance, {{Code|<nowiki>{{Category|Admin}}</nowiki>}} returns: {{Return|{{Category|Admin}}}}
A normal Mediawiki category link, such as {{Code|<nowiki>[[:Category:Admin]]</nowiki>}}, returns: {{Return|[[:Category:Admin]]}}


This is in contrast to a normal Mediawiki category link, such as {{Code|<nowiki>[[:Category:Admin]]</nowiki>}}, which would return: {{Return|[[:Category:Admin]]}}
With no optional parameters, it returns a link to the category page, without the namespace prepended. For instance, {{Code|<nowiki>{{Category|Admin}}</nowiki>}} returns: {{Return|{{Category|Admin}}}}
 
If the second parameter is an arbitrary string, such as {{code|administrative}}, it returns: {{Return|{{Category|Admin|administrative}}}}
 
If the second parameter is {{code|lc}}, it returns: {{Return|{{Category|Admin|lc}}}}
 
If a second parameter is {{Code|end}}, the return is modified: {{Code|<nowiki>{{Category|Admin|end}}</nowiki>}} returns: {{Return|{{Category|Admin|end}}}}
 
A second parameter of {{Code|add}} cannot be demonstrated, as it does not work in the template namespace.

Latest revision as of 14:36, 24 January 2023

Template:Category is used to simplify the creation of links to categories.

Usage

It accepts one mandatory string parameter and one optional parameter:

  • 1 is the name of an article in the category namespace.
  • 2, can be arbitrary text, which will change the text presented by the link, or on eof three special options:
    • add adds the article to the same category it is linking to.
    • end adjusts the output, primarily for grammatical purposes.
    • lc returns the first parameter, but in all lower case.

Return

A normal Mediawiki category link, such as [[:Category:Admin]], returns:

With no optional parameters, it returns a link to the category page, without the namespace prepended. For instance, {{Category|Admin}} returns:

If the second parameter is an arbitrary string, such as administrative, it returns:

If the second parameter is lc, it returns:

If a second parameter is end, the return is modified: {{Category|Admin|end}} returns:

Admin category

A second parameter of add cannot be demonstrated, as it does not work in the template namespace.