Template:Link to category
From FrathWiki
(Redirected from Template:Catlink)
Jump to navigationJump to search
[[:Category:{{{1}}}]]
The problem
If you try to make an ordinary wikilink to a category page with [[Category:CATEGORY NAME]]
you get the current page included in that category rather than a link to the category page.
The solution
Nevertheless you can make a wikilink to a category page with a bit of extra syntax: just put a colon between [[
and Category
, like this: [[:Category:CATEGORY NAME]]
.
The template
This syntax is however somewhat obscure: it is easy to forget that extra colon, and a later editor unaware of this tiny bit of extra syntax might remove the colon. For these reasons it's probably more robust to have a template for this purpose.
Usage
{{link to category|CATEGORY NAME}}
A bit more to type than the raw syntax, but more memorable and clearer, because the template name is self-documenting.