Template:Class: Difference between revisions
From Halopedia, the Halo wiki
m (Protected "Template:Class": High-traffic page ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))) |
BaconShelf (talk | contribs) m (Fixing whitespace issue as per Template:Pattern) |
||
Line 1: | Line 1: | ||
<includeonly>{{#ifeq:{{{3|}}} | <includeonly>{{#ifeq:{{{3|}}} | ||
|{{{3|u}}} | |{{{3|u}}} | ||
|{{# | |{{#if:{{{3|}}} | ||
| | |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{3}}}]] | ||
|[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class]] | |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class]] | ||
}} | }} | ||
|[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{2}}}]] | |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{2}}}]] |
Revision as of 14:12, June 17, 2022
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 empty.
Code: {{Class|CCS|battlecruiser|}} and the text that comes after.
Result: CCS-class and the text that comes after.