Editing TemplateDoc:Acronym
From Halopedia, the Halo wiki
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 41: | Line 41: | ||
This template is used to sanitise Halopedia [[Halopedia:Acronyms|acronyms]] before they are used in other templates. It does ''not'' guarantee that an acronym is valid, as the correct response to an invalid acronym will vary between templates that call this one. However, it guarantees that what it returns will be in lower case and that, if it ''was'' a valid acronym, it will have been replaced with the '''primary''' acronym for that topic. For instance, <code>HTFoR</code> will have been replaced with <code>tfor</code>. This allows template pages to only have to consider the primary acronym cases, while still providing support for the secondary acronyms. | This template is used to sanitise Halopedia [[Halopedia:Acronyms|acronyms]] before they are used in other templates. It does ''not'' guarantee that an acronym is valid, as the correct response to an invalid acronym will vary between templates that call this one. However, it guarantees that what it returns will be in lower case and that, if it ''was'' a valid acronym, it will have been replaced with the '''primary''' acronym for that topic. For instance, <code>HTFoR</code> will have been replaced with <code>tfor</code>. This allows template pages to only have to consider the primary acronym cases, while still providing support for the secondary acronyms. | ||
Usually, if no acronym match is found, the template will simply return exactly what was passed to it, albeit in lower case. However, by setting the <code> | Usually, if no acronym match is found, the template will simply return exactly what was passed to it, albeit in lower case. However, by setting the <code>Passthrough</code> parameter to <code>no</code>, the template can be made to output nothing if the acronym does not exist. | ||
| Line 84: | Line 84: | ||
| - | | - | ||
|''Optional'' | |''Optional'' | ||
|Determines whether or not to pass the original argument through if no acronym match was found. | |Determines whether or not to pass the original argument through if no acronym match was found. Specify <code>no</code> to disable passthrough, and anything else to enable it. Passthrough is enabled by default. | ||
|<code>no</code> | |<code>no</code> | ||
|} | |} | ||
| Line 106: | Line 106: | ||
|"{{Acronym|banana}}" | |"{{Acronym|banana}}" | ||
|- | |- | ||
|<code><nowiki>"{{Acronym|CE| | |<code><nowiki>"{{Acronym|CE|Passthrough=no}}"</nowiki></code> | ||
|"{{Acronym|CE| | |"{{Acronym|CE|Passthrough=no}}" | ||
|- | |- | ||
|<code><nowiki>"{{Acronym|H1X| | |<code><nowiki>"{{Acronym|H1X|Passthrough=no}}"</nowiki></code> | ||
|"{{Acronym|H1X| | |"{{Acronym|H1X|Passthrough=no}}" | ||
|- | |- | ||
|<code><nowiki>"{{Acronym|banana| | |<code><nowiki>"{{Acronym|banana|Passthrough=no}}"</nowiki></code> | ||
|"{{Acronym|banana| | |"{{Acronym|banana|Passthrough=no}}" | ||
|} | |} | ||