https://wiki.reusgame.com/index.php?title=Template:!/doc&feed=atom&action=historyTemplate:!/doc - Revision history2024-03-29T08:24:45ZRevision history for this page on the wikiMediaWiki 1.20.3https://wiki.reusgame.com/index.php?title=Template:!/doc&diff=6070&oldid=prevMadman with a box at 00:09, 18 August 20132013-08-18T00:09:23Z<p></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|2,500,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|!!}} creates ||<br />
* {{tl|!-}} creates |-<br />
* {{tl|-!}} creates &amp;nbsp;|<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 />
* {{tn|)}} creates }<br />
* {{tn|))}} creates }} <br />
* {{tl|!(}} creates [<br />
* {{tl|)!}} creates ] <br />
* {{tl|(!}} creates {| <br />
* {{tl|!)}} creates |} <br />
* {{tl|1==}} creates =<br />
* {{tl|Bar box}} — since {{tl|Bar}} redirects here<br />
<br />
<includeonly><br />
[[Category:Template namespace templates]]<br />
[[Category:Wikipedia formatting and function templates]]<br />
[[Category:Meta-Templates]]<br />
</includeonly></div>Madman with a box