Template:Category link

Revision as of 19:35, 25 February 2018 by Deadfire (talk | contribs)
Related Category: [[:Category:{{{1}}}|{{{1}}}]]



{{Cl|category name}}
{{Cl|category name|link text}}
{{Cl|category name|link text|count=yes}}
{{Cl|category name|link text|count=yes|count_type=type}}
{{Cl|category name|link text|count=yes|count_type=type|backlog=backlog threshold}}

{{Cl}} ("[C]ategory [l]ink") produces a link to a category in a similar fashion to {{Tl}} for a template. For example:

{{Cl|Africa}} produces:
Related Category: Africa

To specify the text used for the link, add it as a second parameter:

{{Cl|Africa|this category}} produces:
Related Category: Africa

To add a count of everything in the category, add the |count=yes parameter:

{{Cl|Africa|count=yes}} produces:
Related Category: Africa

If you just want to get a count of pages, files, or subcats, use the |count_type= parameter:

{{Cl|Africa|count=yes|count_type=all}} produces:
Related Category: Africa
(default)
{{Cl|Africa|count=yes|count_type=pages}} produces:
Related Category: Africa
{{Cl|Africa|count=yes|count_type=subcats}} produces:
Related Category: Africa
{{Cl|Africa|count=yes|count_type=files}} produces:
Related Category: Africa

If you want to make counts standout for categories that have a backlog, use |backlog=:

{{Cl|Africa|count=yes|backlog=20}} produces:
Related Category: Africa

See also

Related Category: Internal link templates
Template Example output
{{c}} Help
{{cl}}
Related Category: Help
{{cls}} Cat:Help
Template Example output
{{cconly}} 45
{{clc}} Category:Help (45)
{{lc}} Category:Help (edit | talk | history | links | watch | logs)
{{lcs}} Category:Help (Edit Discussion links Page history)