Editing TemplateDoc:Acronym

From Halopedia, the Halo wiki

You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

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 38: Line 38:
|}
|}


==Description==
==Usage==
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>NoPassthrough</code> flag, the template can be made to output nothing if the acronym does not exist.
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>NoPassthrough</code> flag, the template can be made to output nothing if the acronym does not exist.
==Usage==
===Syntax===
To insert this template onto a page, place the following wikitext onto the article.
{|width=100%
!width=50%|Simplified Version
!width=50%|Full Version
|-
|
<pre>
{{Acronym
|
}}
</pre>
|
<pre>
{{Acronym
|NoPassthrough=
|
}}
</pre>
|}


===Parameters===
===Parameters===
Line 81: Line 57:
|<code>TFoR</code>
|<code>TFoR</code>
|-
|-
|'''NoPassthrough'''
|'''Passthrough'''
| -
| -
|''Optional''
|''Optional''
Line 115: Line 91:
|"{{Acronym|banana|NoPassthrough=yes}}"
|"{{Acronym|banana|NoPassthrough=yes}}"
|}
|}
==Dependencies==
===Template dependencies===
This template depends upon the following templates:
*[[Template:Acronym/Official]]
*[[Template:Acronym/Game]]
*[[Template:Acronym/Novel]]
*[[Template:Acronym/Comic]]
*[[Template:Acronym/MiscBook]]
*[[Template:Acronym/Film]]
*[[Template:Acronym/Marketing]]
===Extension dependencies===
This template requires the following extensions:
*[[mw:Extension:Variables|Variables]] - used to optimise the number of template calls made, by caching previous call results
===Dependent templates===
The following templates depend upon this one. If you are making changes to this template, please ensure that they will not break any of them!
*[[Template:Acronym/Exists]]
*[[Template:Acronym/LongName]]
*[[Template:Acronym/ShortName]]
*[[Template:Acronym/ShortestName]]
*[[Template:Acronym/PageName]]
*[[Template:Acronym/LongLink]]
*[[Template:Acronym/ShortLink]]
*[[Template:Acronym/ShortestLink]]
*[[Template:Acronym/Link]]
<noinclude>[[Category:Shorthand template documentation]]</noinclude>


<noinclude>[[Category:Acronym template documentation]]</noinclude>
<noinclude>[[Category:Acronym template documentation]]</noinclude>

Please note that all contributions to Halopedia are considered to be released under the Attribution-ShareAlike 4.0 International license (see Halopedia:Copyrights for details). If you don't want your writing to be edited mercilessly and redistributed at will, then don't submit it here. You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)

To view or search uploaded images go to the list of images. Uploads and deletions are also logged in the upload log. For help including images on a page see Help:Images. For a sound file, use this code: [[Media:File.ogg]].

Do not copy text from other websites without permission. It will be deleted.