Difference between revisions of "Template:Category link/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sardanaphalus
m (→‎See also: link update)
imported>Sardanaphalus
(Update (second parameter))
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE -->
 +
{{hatnote|{{tl|Category}} redirects here. You may be looking for {{tl|Wikipedia category}}.}}
  
:''{{tlx|Category}} redirects here.  You may be looking for {{tlx|Wikipedia category}}''
+
: {{tlx|cl|''category name''}}
 +
: {{tlx|cl|''category name''|''link text''}}
  
{{tnull|{{BASEPAGENAME}}}} ("[c]ategory [l]ink") produces a link to a category.
+
Like {{tlpad|tl}}, which produces a link to a template, {{tlpad|cl}} ("[c]ategory [l]ink") produces a link to a category:
 +
: {{tcpl|cl|Wikipedia templates}} produces: {{cl|Wikipedia templates}}
  
It is a companion to {{tlx|tl}}, which serves the same purpose for templates.
+
To display the link with customized text, add it as a second parameter:
 
+
: {{tcpl|cl|Wikipedia templates|the "Wikipedia templates" category}} produces: {{cl|Wikipedia templates|the "Wikipedia templates" category}}
== Example ==
 
 
 
{{evaldemo/3|cl|Africa}}
 
 
 
Easier than <nowiki>[[:Category:Africa]]</nowiki>.
 
  
 
== See also ==
 
== See also ==
Line 23: Line 21:
 
* {{cl|Internal link templates}}
 
* {{cl|Internal link templates}}
  
<includeonly>
+
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
 
 
[[Category:Internal category-link templates]]
 
[[Category:Internal category-link templates]]
}}
+
}}</includeonly>
</includeonly>
 

Revision as of 12:00, 27 August 2014

{{cl|category name}}
{{cl|category name|link text}}

Like Template:Tlpad, which produces a link to a template, Template:Tlpad ("[c]ategory [l]ink") produces a link to a category:

Template:Tcpl produces: Category:Wikipedia templates

To display the link with customized text, add it as a second parameter:

Template:Tcpl produces: the "Wikipedia templates" category

See also