Template:Class: Difference between revisions

From Halopedia, the Halo wiki

mNo edit summary
mNo edit summary
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<includeonly>{{#ifeq:{{{3|}}}
<includeonly>{{#ifeq:{{{3|}}}
  |{{{3|u}}}
  |{{{3|u}}}
  |{{#ifeq:{{{3|}}}
  |{{#if:{{{3|}}}
   |" "
   |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{3}}}]]
   |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class]]
   |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class]]
  |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{3}}}]]
   }}
   }}
  |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{2}}}]]
  |[[{{{1}}}-class {{{2}}}|''{{{1}}}''-class {{{2}}}]]
Line 11: Line 10:
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>'''
Code: '''<nowiki>{{Class|Halcyon|light cruiser}}</nowiki>'''


Result: [[CCS-class battlecruiser|''CCS''-class battlecruiser]]
Result: {{Class|Halcyon|light cruiser}}


==Usage==
==Usage==
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>'''
Code: '''<nowiki>{{Class|Halcyon|light cruiser}}</nowiki>'''


Result: {{Class|CCS|battlecruiser}}
Result: {{Class|Halcyon|light cruiser}}


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>'''
Code: '''<nowiki>{{Class|Halcyon|light cruiser|ship}}</nowiki>'''


Result: {{Class|CCS|battlecruiser|ship}}
Result: {{Class|Halcyon|light cruiser|ship}}


If we want to leave out the follow-on text altogether, we make the third  parameter empty.
If we want to leave out the follow-on text altogether, we make the third  parameter empty.


Code: '''<nowiki>{{Class|CCS|battlecruiser|}}</nowiki> and the text that comes after.'''
Code: '''<nowiki>{{Class|Halcyon|light cruiser|}}</nowiki> and the text that comes after.'''


Result: {{Class|CCS|battlecruiser|}} and the text that comes after.
Result: {{Class|Halcyon|light cruiser|}} and the text that comes after.


[[Category: Templates]]
[[Category:Templates]]</noinclude>
</noinclude>

Latest revision as of 17:33, October 17, 2023

Purpose

To avoid having to enter the following code to achieve the proper link and italics:

Code: {{Class|Halcyon|light cruiser}}

Result: Halcyon-class light cruiser

Usage

Most cases we want to provide a direct link to the article with the minimum of fuss.

Code: {{Class|Halcyon|light cruiser}}

Result: Halcyon-class light cruiser

Sometimes, we don't want to use the ship's type as the follow on text.

Code: {{Class|Halcyon|light cruiser|ship}}

Result: Halcyon-class ship

If we want to leave out the follow-on text altogether, we make the third parameter empty.

Code: {{Class|Halcyon|light cruiser|}} and the text that comes after.

Result: Halcyon-class and the text that comes after.