Difference between revisions of "Template:C"
From Tales of Maj'Eyal
(Created template for category links) |
(Added parameter 2 to overwrite displayed name) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly><onlyinclude>[[{{lc:{{{1}}}}} (category)|{{{1}}}]]</onlyinclude></includeonly> | + | <includeonly><onlyinclude>[[{{lc:{{{1}}}}} (category)|{{#if:{{{2|}}}|{{{2}}}|{{{1}}}}}]]</onlyinclude></includeonly> |
[[Category:Templates]] | [[Category:Templates]] | ||
− | This template is designed to reduce typing when trying to create a link to a category. Simply enter the category name as the first parameter, and the template will change all into lower case | + | This template is designed to reduce typing when trying to create a link to a category. Simply enter the category name as the first parameter, and the template will change all letters into lower case, append ''(category)'' to the end of it, then create a link to that category while preserving the displayed name as you have typed it. |
If you enter | If you enter | ||
− | <pre>{{c| | + | <pre>{{c|Lethality}}</pre> |
then you will obtain | then you will obtain | ||
− | {{c| | + | {{c|Lethality}} |
+ | |||
+ | An optional parameter 2 can be entered to overwrite the displayed name of the link. If you enter, for example | ||
+ | |||
+ | <pre>{{c|Lethality|ABC}}</pre> | ||
+ | |||
+ | then you will obtain | ||
+ | |||
+ | {{c|Lethality|ABC}} |
Latest revision as of 21:19, 9 September 2014
This template is designed to reduce typing when trying to create a link to a category. Simply enter the category name as the first parameter, and the template will change all letters into lower case, append (category) to the end of it, then create a link to that category while preserving the displayed name as you have typed it.
If you enter
{{c|Lethality}}
then you will obtain
Lethality
An optional parameter 2 can be entered to overwrite the displayed name of the link. If you enter, for example
{{c|Lethality|ABC}}
then you will obtain
ABC