https://heald.nga.gov/mediawiki/index.php?title=Template:!/doc&feed=atom&action=historyTemplate:!/doc - Revision history2024-03-29T12:06:01ZRevision history for this page on the wikiMediaWiki 1.35.2https://heald.nga.gov/mediawiki/index.php?title=Template:!/doc&diff=233&oldid=prevEmily Pugh: 1 revision2012-04-18T15:47:18Z<p>1 revision</p>
<p><b>New page</b></p><div>{{Documentation subpage}}<br />
<!-- DO NOT move the "pp-template" to the template page since the ! template should be as short as possible to save server load (to not break template inclusion limits). --><br />
{{high-risk|6,000,000+}}<br />
__NOTOC__<br />
<br />
== Usage ==<br />
<br />
This is the {{t<noinclude>n</noinclude><includeonly>l</includeonly>|!}} meta-template. Its use is analogous to an [[escape character]].<br />
<br />
This is an auxiliary template allowing the encoding of "<code>|</code>" within template parameters, because the pipe character is normally interpreted as a separator. This template is necessary if the character is used in wiki table syntax, or if the parameter is automatically wikilinked and you wish to use a pipe to specify different link text from the target page name. In other cases it is better to use "<code>&amp;#124;</code>". <br />
<br />
This template cannot be used for putting the character as text in a wiki table; in that case, again, "<code>&amp;#124;</code>" can be used.<br />
<br />
Note that no special template is needed for "<code>!</code>" (exclamation mark).<br />
<br />
This is a [[WP:high-risk template|high-risk template]], and it usually cannot be [[Wikipedia:Substitution|substituted]] (see conditions for substing on [[#Substitution|the section below]]).<br />
<br />
=== Substitution ===<br />
It is possible to [[Wikipedia:Substitution|substitute]] <nowiki>{{!}}</nowiki> only if an unescaped "'''<code>|</code>'''" works as expected, i.e. after substituting the template containing <nowiki>{{!}}</nowiki>, or after eliminating an<br />
[[mw:Help:Extension:ParserFunctions#.23if|#if]] containing <nowiki>{{!}}</nowiki>.<br />
<br />
=== A simple example ===<br />
<br />
The following template code for {{tl|Quotation}} using an ordinary pipe character,<br />
* <code><nowiki>{{Quotation|It is not possible to use an ordinary pipe character | in template parameters, as it will be interpreted as a separator.|[[Help:Template#Usage hints and workarounds]]}}</nowiki></code><br />
<br />
produces:<br />
{{Quotation|It is not possible to use an ordinary pipe character | in template parameters, as it will be interpreted as a separator.|[[Help:Template#Usage hints and workarounds]]}}<br />
<br />
whereas this code using the <nowiki>{{!}}</nowiki> meta-template,<br />
* <code><nowiki>{{Quotation|It is not possible to use an ordinary pipe character {{!}} in template parameters, as it will be interpreted as a separator.|[[Help:Template#Usage hints and workarounds]]}}</nowiki></code><br />
<br />
produces:<br />
{{Quotation|It is not possible to use an ordinary pipe character {{!}} in template parameters, as it will be interpreted as a separator.|[[Help:Template#Usage hints and workarounds]]}}<br />
<br />
== See also ==<br />
* {{tl|!!}}<br />
* {{tl|!-}} creates |-<br />
* {{tl|-!}}<br />
* {{tl|broken bar}}<br />
* {{tn|'}} and related<br />
* [[Wikipedia:Conditional tables]]<br />
* {{tl|pipe}} - Note that this one looks like {{tlf|!}} but has a very different meaning for the MediaWiki parser and thus has different functionality.<br />
* {{tn|(}} creates {<br />
* {{tn|((}} creates {{<br />
* {{tl|!(}}<br />
* {{[[template:=|=]]}}<br />
<br />
<includeonly><br />
[[Category:Template namespace templates|{{PAGENAME}}]]<br />
[[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]<br />
<br />
[[ar:قالب:!]]<br />
[[as:Template:!]]<br />
[[be-x-old:Шаблён:!]]<br />
[[bg:Шаблон:!]]<br />
[[bn:Template:!]]<br />
[[cs:Šablona:!]]<br />
[[da:Skabelon:!]]<br />
[[de:Vorlage:!]]<br />
[[dsb:Pśedłoga:!]]<br />
[[et:Mall:!]]<br />
[[es:Plantilla:!]]<br />
[[fa:الگو:!]]<br />
[[fr:Modèle:!]]<br />
[[hsb:Předłoha:!]]<br />
[[it:Template:!]]<br />
[[ja:Template:!]]<br />
[[ka:თარგი:!]]<br />
[[ko:틀:!]]<br />
[[ku:Şablon:!]]<br />
[[la:Formula:!]]<br />
[[myv:ЛопаПарцун:!]]<br />
[[nl:Sjabloon:!]]<br />
[[no:Mal:!]]<br />
[[pap:Template:!]]<br />
[[pl:Szablon:!]]<br />
[[pt:Template:!]]<br />
[[ru:Шаблон:!]]<br />
[[sk:Šablóna:!]]<br />
[[sl:Template:!]]<br />
[[sr:Шаблон:!]]<br />
[[vi:Tiêu bản:!]]<br />
[[zh:Template:!]]<br />
[[zh-yue:Template:!]]<br />
[[he:תבנית:!]]<br />
[[uk:Шаблон:!]]<br />
[[fi:Malline:!]]<br />
[[sv:Mall:!]]<br />
[[simple:Template:!]]<br />
</includeonly><noinclude><br />
[[es:Plantilla:!/doc]]<br />
[[or:ଟେମ୍ପଲେଟ:!/doc]]<br />
[[ro:Format:!/doc]]<br />
[[ru:Шаблон:!/doc]]<br />
</noinclude></div>Emily Pugh