(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 |
||
| Line 1: | Line 1: | ||
{{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 {{ | It accepts one {{Parameter|mandatory|string}}, the name of an article in the category namespace and one {{Parameter|optional}}. | ||
==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}}}} | 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]]</nowiki>}}, which would return: {{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]]}} | ||
If a second parameter of {{Code|end}} is included, the return is modified: {{Code|<nowiki>{{Category|Admin|end}}</nowiki>}} returns: {{Return|{{Category|Admin|end}}}} | |||
Revision as of 13:25, 23 October 2022
Template:Category is used to simplify the creation of links to categories.
Usage
It accepts one mandatory string parameter, the name of an article in the category namespace and one optional parameter.
Return
It returns a link to the category page, without the namespace prepended. For instance, {{Category|Admin}} returns:
This is in contrast to a normal Mediawiki category link, such as [[:Category:Admin]], which would return:
If a second parameter of end is included, the return is modified: {{Category|Admin|end}} returns:
Admin category
