Template:Class: Difference between revisions

From Halopedia, the Halo wiki

m (Fixing whitespace issue as per Template:Pattern)
m (Link replacement, replaced: ''CCS''-class battlecruiser → {{Pattern|Ket|battlecruiser}} (2), {{Class|CCS|battlecruiser}} → {{Pattern|Ket|battlecruiser}} (2), {{Class|CCS|battlecruiser|}} → {{Pattern|Ket|battlecruiser|}} (2))
Line 10: 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>{{Pattern|Ket|battlecruiser}}</nowiki>'''


Result: [[CCS-class battlecruiser|''CCS''-class battlecruiser]]
Result: {{Pattern|Ket|battlecruiser}}


==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>{{Pattern|Ket|battlecruiser}}</nowiki>'''


Result: {{Class|CCS|battlecruiser}}
Result: {{Pattern|Ket|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.
Line 29: Line 29:
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>{{Pattern|Ket|battlecruiser|}}</nowiki> and the text that comes after.'''


Result: {{Class|CCS|battlecruiser|}} and the text that comes after.
Result: {{Pattern|Ket|battlecruiser|}} and the text that comes after.


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

Revision as of 18:20, September 6, 2022

Purpose

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

Code: {{Pattern|Ket|battlecruiser}}

Result: Ket-pattern battlecruiser

Usage

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

Code: {{Pattern|Ket|battlecruiser}}

Result: Ket-pattern 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: {{Pattern|Ket|battlecruiser|}} and the text that comes after.

Result: Ket-pattern and the text that comes after.