Difference between revisions of "Template:C/doc"
Jump to navigation
Jump to search
imported>Sardanaphalus (category update) |
imported>Sardanaphalus (optional icon prefix, sandbox handling) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----> | <!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE----> | ||
| + | |||
| + | : {{tlx|c|''category name''}} | ||
| + | : {{tlx|c|''category name''|''link text''}} | ||
| + | : {{tlx|c|icon|''category name''}} | ||
| + | : {{tlx|c|icon|''category name''|''link text''}} | ||
| + | |||
===Usage=== | ===Usage=== | ||
| − | + | Use {{tlpad|c}} to create a [[Wikipedia:Namespace|namespace]]-free link to a category, i.e. {{c|Philosophy}} rather than {{cl|Philosophy}}, {{cls|Philosophy}}, etc: | |
: <code><nowiki>{{c|Philosophy}}</nowiki></code> produces: {{c|Philosophy}} | : <code><nowiki>{{c|Philosophy}}</nowiki></code> produces: {{c|Philosophy}} | ||
| + | To specify the text used for the link{{aside|e.g. "Philosophy category" in place of "Philosophy"}} add it as the next parameter: | ||
| + | : <code><nowiki>{{c|Philosophy|Philosophy category}}</nowiki></code> produces: {{c|Philosophy|Philosophy category}} | ||
| − | + | To prefix the link with the category icon "{{icon|Category}}" (e.g. as seen in templates), set the first parameter as {{para||icon}}: | |
| − | : <code><nowiki>{{c|Philosophy|Philosophy category}}</nowiki></code> produces: {{c|Philosophy|Philosophy category}} | + | : <code><nowiki>{{c|icon|Philosophy}}</nowiki></code> produces: {{c|icon|Philosophy}} |
| + | : <code><nowiki>{{c|icon|Philosophy|Philosophy category}}</nowiki></code> produces: {{c|icon|Philosophy|Philosophy category}} | ||
===See also=== | ===See also=== | ||
| − | * {{tlspc|cl}}, which produces the second type of link shown | + | * {{tlspc|cl}}, which produces the second type of link shown in the Usage section ({{cl|Philosophy}}, i.e. including the namespace prefix). |
| − | * {{tlspc|cls}}, which produces the third type shown | + | * {{tlspc|cls}}, which produces the third type shown in the Usage section ({{cls|Philosophy}}, i.e. including an abbreviated prefix). |
| − | * {{tlspc|lcs}}, which produces {{lcs|Philosophy}}. | + | * {{tlspc|lcs}}, which produces: {{lcs|Philosophy}} |
| + | * {{tl|icon}} for other standard Wikipedia icons. | ||
| − | <includeonly> | + | <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
| − | <!----CATEGORIES BELOW THIS LINE, PLEASE:----> | + | | <!----CATEGORIES BELOW THIS LINE, PLEASE:----> |
[[Category:Internal category-link templates]] | [[Category:Internal category-link templates]] | ||
| Line 25: | Line 35: | ||
{{pp-template|small=yes}} | {{pp-template|small=yes}} | ||
| − | </includeonly> | + | }}<!--(end #ifeq)--></includeonly> |
Revision as of 15:38, 25 August 2014
| This is a documentation subpage for Template:C. It contains usage information, categories and other content that is not part of the original template page. |
{{c|category name}}{{c|category name|link text}}{{c|icon|category name}}{{c|icon|category name|link text}}
Usage
Use Template:Tlpad to create a namespace-free link to a category, i.e. Philosophy rather than Category:Philosophy, Cat:Philosophy, etc:
{{c|Philosophy}}produces: Philosophy
To specify the text used for the link<aside>e.g. "Philosophy category" in place of "Philosophy"</aside> add it as the next parameter:
{{c|Philosophy|Philosophy category}}produces: Philosophy category
To prefix the link with the category icon "
" (e.g. as seen in templates), set the first parameter as |icon:
{{c|icon|Philosophy}}produces: Philosophy{{c|icon|Philosophy|Philosophy category}}produces: Philosophy
See also
- Template:Tlspc, which produces the second type of link shown in the Usage section (Category:Philosophy, i.e. including the namespace prefix).
- Template:Tlspc, which produces the third type shown in the Usage section (Cat:Philosophy, i.e. including an abbreviated prefix).
- Template:Tlspc, which produces: (edit talk links history)
- {{icon}} for other standard Wikipedia icons.