Template:Category code: Difference between revisions
Template page
More actions
Created page with "<includeonly><code><nowiki>[[</nowiki>{{#if:{{{1|}}}|[[:{{#if:{{NAMESPACE:{{{1|}}}}}|{{{1|}}}|Category:{{{1|}}}}}]]|{{FULLPAGENAME}}}}{{#if:{{{2|}}}|{{!}}{{{2}}}}}<nowiki>]]</nowiki></code></includeonly><noinclude>{{documentation}} </noinclude>" |
(No difference)
|
Latest revision as of 03:14, 17 February 2025
Use
This template creates a formatted link to a category. Without an optional category name, this template creates a formatted but disabled link to the current page.
The syntax of this template is:
{{catt|1=1|2=2}}
where
- 1 is an optional category name with or without the Category: prefix.
- 2 is an optional sort key.
Examples
- Without a category name, {{catt}} creates:
[[Template:Category code]]
- With a category name, {{catt|Wikipedians in South Dakota}} creates:
[[Category:Wikipedians in South Dakota]]
- With a category prefix and name, {{catt|Category:Scottish Wikipedians}} creates:
[[Category:Scottish Wikipedians]]
See also
- {{Template:Template link 2}}, with which this template is compatible.