Template:Cl

From Star Trek Timelines Wiki
Jump to navigation Jump to search

[[:Category:|{{{1}}}]]

Usage


Template:Trait redirects here.

Categorize and Link. Creates a link and also places in category. Automatic first-letter capitalization. Categories will only display in article space (not on template and user pages).

{{cl
| <!--Category page name-->
|text= <!--optional link name (if different from category page name)-->
|mission= <!--optional mission name, if given, page is treated as a mission and will be placed at the top of the category when sorted (to eliminate need to manually list missions that recommend a skill on a category page)-->
}}

Examples (note: categorization links excluded in demo):

Code Preview Description
{{cl/crew|Communicator|Starfleet}}
Communicator, Starfleet Just a convenient shorthand to list up to 16 traits on a crew page, separated by commas.

Used on crew pages in place of trait links inside Template:Infobox crew.

{{cl/mission|Communicator|Starfleet}}
Communicator, Starfleet Just a convenient shorthand to list up to 32 traits on a mission page, separated by commas.

Will categorize the mission page with a sort key that separates it from crew pages.

{{cl/locked|Communicator|Starfleet}}
Communicator
or
Starfleet
If two traits are given, separates them with an 'or'. Centering not included (shown only because mission tables center by default). Like cl/missions except places under sortkey ! instead (and only takes 2 traits). If both traits omitted, returns a blank (handled by Template:MWalk1)
{{cl/locked|Prodigy}}
Prodigy
Advanced / single use
{{cl|human}}
Human
{{cl|communicator}}
Communicator Note how this is shorter than [[Communicator (trait)|Communicator]]. Don't even need the {{{text}}} parameter.

(TBH, I can't think of a case that would even use text, but included it just in case)

{{cl|Starfleet|mission={{PAGENAME}}}}
Starfleet Use the mission parameter to specify that the template is being used on a mission page and provide the mission name for categorization sorting.
{{cl|Starfleet|locked}}
Starfleet Pass the magic word "locked" as the second parameter and this will categorize the page under the sortkey !. Page name detected automatically (probably should have done the mission param this way, but eh cl/mission makes it unnecessary to fix it)