Template:C/doc: Difference between revisions
Template page
More actions
improve |
No edit summary |
||
| Line 1: | Line 1: | ||
{{TemplateBox | |||
|1=1 | |||
|1d=category name | |||
|1def= | |||
|1stat=required | |||
|2=2 | |||
|2d=link text to display (instead of category name) | |||
|2def= | |||
|2stat=optional | |||
|3=3 | |||
|3d=if <tt>3=X</tt>, link is displayed with coloured background | |||
|3def= | |||
|3stat=optional | |||
|name=C | |||
|desc=Displays category links | |||
|namespace=all | |||
|usergroup=all | |||
|placement= | |||
|usage-notes= | |||
|type= | |||
|example= | |||
|i18n-method= | |||
|i18n-desc= | |||
|i18n-mediawiki-msg= | |||
|seealso= | |||
|setscats= | |||
|lines= | |||
|shorthand= | |||
|relieson= | |||
}} | |||
;usage | ;usage | ||
:Template will display <code> <nowiki>{{{2}}}</nowiki> </code>, or just the category name given as <code> <nowiki>{{{1}}}</nowiki> </code>. | :Template will display <code> <nowiki>{{{2}}}</nowiki> </code>, or just the category name given as <code> <nowiki>{{{1}}}</nowiki> </code>. | ||
Revision as of 20:23, 31 October 2011
Displays category links
Usage
{{C |1= |2= |3= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | category name | empty | required | |
2 | link text to display (instead of category name) | empty | optional | |
3 | if 3=X, link is displayed with coloured background | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
- usage
- Template will display
{{{2}}}, or just the category name given as{{{1}}}. - If the category {{{1}}} does not exist no link will be generated;
- {{{1}}} or {{{2}}} will get background color when {{{3}}} = X
- else [[Category:{{{1}}}]] or [[Category:{{{2}}}]] is displayed.
code implemented as:
[[:Category:{{{1}}}|{{{2|{{{1}}}}}}]]
- example
- {{C|not-existing-cat}} produces not-existing-cat
- {{C|not-existing-cat|}} produces not-existing-cat
- {{C|not-existing-cat|display}} produces display
- {{C|not-existing-cat|3=X}} produces not-existing-cat
- {{C|not-existing-cat|display|X}} produces display