Template:Acronym/Exists: Difference between revisions

From Halopedia, the Halo wiki

(Added H1C)
m (→‎top: Moving page, replaced: {{Documentation → {{Doc/Template)
 
(7 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}
<includeonly>{{#if:{{Acronym|{{{1}}}|NoPassthrough=yes}}|yes|}}</includeonly><noinclude>{{Doc/Template}} [[Category:Acronym templates]]</noinclude>
<!-- ####### OFFICIAL ###### -->
| HP    = yes
<!-- ####### GAMES ####### -->
| CE    = yes
| HCE    = yes
| H1    = yes
| H1C    = yes
| H1X    = yes
| PC    = yes
| HPC    = yes
| CuEd  = yes
| H2    = yes
| H2C    = yes
| H2X    = yes
| H2V    = yes
| H2PC  = yes
| H3    = yes
| HW    = yes
| ODST  = yes
| H3ODST = yes
| H3M    = yes
| HR    = yes
| HA    = yes
| CEA    = yes
| HCEA  = yes
| KotH  = yes
| H4KotH = yes
| H4    = yes
| SA    = yes
| HSA    = yes
| MCC    = yes
| HMCC  = yes
| TMCC  = yes
| HTMCC  = yes
| H2A    = yes
| SS    = yes
| HSS    = yes
| H5    = yes
| H5G    = yes
| H5F    = yes
| HWDE  = yes
| HW2    = yes
| FTR    = yes
| HFR    = yes
| HFTR  = yes
| HI    = yes
| HInf  = yes
<!-- ####### NOVELS ####### -->
| TFoR  = yes
}}</includeonly><noinclude>
==Usage==
This template is used to check if the given parameter is a valid [[Halopedia:Acronyms|acronym]] on Halopedia. For instance, <code><nowiki>{{#if:{{Acronym/Exists|CE}}|Acronym exists!|Acronym does not exist!}}</nowiki></code> produces "{{#if:{{Acronym/Exists|CE}}|Acronym exists!|Acronym does not exist!}}", meanwhile <code><nowiki>{{#if:{{Acronym/Exists|banana}}|Acronym exists!|Acronym does not exist!}}</nowiki></code> produces "{{#if:{{Acronym/Exists|banana}}|Acronym exists!|Acronym does not exist!}}"
</noinclude>

Latest revision as of 18:49, December 15, 2021

vde
Template Documentation

Usage

This template is used to check if the given parameter is a valid acronym on Halopedia. It can be used in conjunction with the {{#if:...|...|...}} parser function in order to conditionally display one thing if the acronym exists and another if it doesn't.

{{Acronym/Exists
|
}}

Parameters

Field Name Field Aliases Optional or Required? Description Example
1 (Unnamed field) - Required The acronym to check. TFoR

Error states

This template has no error states.

Example

Here is an example of what the template will output, when used:

Wiki markup Result
"{{Acronym/Exists|CE}}" "yes"
"{{Acronym/Exists|banana}}" ""
"{{#if:{{Acronym/Exists|CE}}|Acronym exists!|Acronym does not exist!}}" "Acronym exists!"
"{{#if:{{Acronym/Exists|banana}}|Acronym exists!|Acronym does not exist!}}" "Acronym does not exist!"