Template:Class: Difference between revisions
From Halopedia, the Halo wiki
mNo edit summary |
mNo edit summary |
||
Line 1: | Line 1: | ||
{{#ifeq:{{{3| }}}|{{{3|u}}}| | {{#ifeq:{{{3| }}}|{{{3|u}}}| | ||
{{#ifeq:{{{3| }}}| | | {{#ifeq:{{{3| }}}| | | ||
[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class]]| | [[{{{1}}}-class {{{2}}}|''{{{1}}}''-class A]]| | ||
[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{3}}}]] | [[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{3}}}]] | ||
}}| | }}| | ||
Line 7: | Line 7: | ||
}} | }} | ||
<noinclude> | <noinclude> | ||
==Purpose== | ==Purpose== | ||
To avoid having to enter the following code to achieve the proper link and italics: | To avoid having to enter the following code to achieve the proper link and italics: | ||
Code: <nowiki>[[CCS-class Battlecruiser|''CCS''-class Battlecruiser]]</nowiki><br /> | Code: '''<nowiki>[[CCS-class Battlecruiser|''CCS''-class Battlecruiser]]</nowiki>'''<br /> | ||
Result: [[CCS-class Battlecruiser|''CCS''-class Battlecruiser]] | Result: [[CCS-class Battlecruiser|''CCS''-class Battlecruiser]] | ||
Line 18: | Line 16: | ||
Most cases we want to provide a direct link to the article with the minimum of fuss. | Most cases we want to provide a direct link to the article with the minimum of fuss. | ||
Code: <nowiki>{Class|CCS|Battlecruiser}}</nowiki><br /> | Code: '''<nowiki>{{Class|CCS|Battlecruiser}}</nowiki>'''<br /> | ||
Result: {{Class|CCS|Battlecruiser}} | Result: {{Class|CCS|Battlecruiser}} | ||
Sometimes, we don't want to use the ship's ''type'' as the follow on text. | Sometimes, we don't want to use the ship's ''type'' as the follow on text. | ||
Code: <nowiki>{{Class|CCS|Battlecruiser|ship}}</nowiki><br /> | Code: '''<nowiki>{{Class|CCS|Battlecruiser|ship}}</nowiki>'''<br /> | ||
Result: {{Class|CCS|Battlecruiser|ship}} | Result: {{Class|CCS|Battlecruiser|ship}} | ||
If we want to leave out the follow-on text altogether, we make the third parameter an empty space. Note that the third parameter's space is not included in the output. | If we want to leave out the follow-on text altogether, we make the third parameter an empty space. Note that the third parameter's space is not included in the output. | ||
Code: <nowiki>{{Class|CCS|Battlecruiser| | Code: '''<nowiki>{{Class|CCS|Battlecruiser|}}</nowiki> and the text that comes after.'''<br /> | ||
Result: {{Class|CCS|Battlecruiser| }} and the text that comes after.<br /> | Result: {{Class|CCS|Battlecruiser|}} and the text that comes after.<br /> | ||
[[Category: Templates]] | [[Category: Templates]] | ||
</noinclude> | </noinclude> |
Revision as of 22:50, November 12, 2007
[[{{{1}}}-class {{{2}}}|{{{1}}}-class {{{2}}}]]
Purpose
To avoid having to enter the following code to achieve the proper link and italics:
Code: [[CCS-class Battlecruiser|''CCS''-class Battlecruiser]]
Result: CCS-class Battlecruiser
Usage
Most cases we want to provide a direct link to the article with the minimum of fuss.
Code: {{Class|CCS|Battlecruiser}}
Result: CCS-class Battlecruiser
Sometimes, we don't want to use the ship's type as the follow on text.
Code: {{Class|CCS|Battlecruiser|ship}}
Result: CCS-class ship
If we want to leave out the follow-on text altogether, we make the third parameter an empty space. Note that the third parameter's space is not included in the output.
Code: {{Class|CCS|Battlecruiser|}} and the text that comes after.
Result: CCS-class A
and the text that comes after.