https://wiki.tiplanet.org/index.php?title=Mod%C3%A8le:!/doc&feed=atom&action=history Modèle:!/doc - Historique des versions 2024-03-28T11:50:27Z Historique des versions pour cette page sur le wiki MediaWiki 1.40.0 https://wiki.tiplanet.org/index.php?title=Mod%C3%A8le:!/doc&diff=135&oldid=prev Adriweb : 1 version : moar templates 2012-09-03T13:32:28Z <p>1 version : moar templates</p> <p><b>Nouvelle page</b></p><div>{{Documentation subpage}}<br /> &lt;!-- DO NOT move the &quot;pp-template&quot; to the template page since the ! template should be as short as possible to save server load (to not break template inclusion limits). --&gt;<br /> {{high-risk|3,600,000+}}<br /> __NOTOC__<br /> <br /> == Usage ==<br /> <br /> This is the {{t&lt;noinclude&gt;n&lt;/noinclude&gt;&lt;includeonly&gt;l&lt;/includeonly&gt;|!}} meta-template. Its use is analogous to an [[escape character]].<br /> <br /> This is an auxiliary template allowing the encoding of &quot;&lt;code&gt;|&lt;/code&gt;&quot; 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 &quot;&lt;code&gt;&amp;amp;#124;&lt;/code&gt;&quot;. <br /> <br /> This template cannot be used for putting the character as text in a wiki table; in that case, again, &quot;&lt;code&gt;&amp;amp;#124;&lt;/code&gt;&quot; can be used.<br /> <br /> Note that no special template is needed for &quot;&lt;code&gt;!&lt;/code&gt;&quot; (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]] &lt;nowiki&gt;{{!}}&lt;/nowiki&gt; only if an unescaped &quot;'''&lt;code&gt;|&lt;/code&gt;'''&quot; works as expected, i.e. after substituting the template containing &lt;nowiki&gt;{{!}}&lt;/nowiki&gt;, or after eliminating an<br /> [[mw:Help:Extension:ParserFunctions#.23if|#if]] containing &lt;nowiki&gt;{{!}}&lt;/nowiki&gt;.<br /> <br /> === A simple example ===<br /> <br /> The following template code for {{tl|Quotation}} using an ordinary pipe character,<br /> * &lt;code&gt;&lt;nowiki&gt;{{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]]}}&lt;/nowiki&gt;&lt;/code&gt;<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 &lt;nowiki&gt;{{!}}&lt;/nowiki&gt; meta-template,<br /> * &lt;code&gt;&lt;nowiki&gt;{{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]]}}&lt;/nowiki&gt;&lt;/code&gt;<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 /> * {{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 /> * {{tl|1==}}<br /> * {{tl|Bar box}} — since {{tl|Bar}} redirects here<br /> <br /> &lt;includeonly&gt;<br /> [[Category:Template namespace templates|{{PAGENAME}}]]<br /> [[Category:Wikipedia formatting and function templates|{{PAGENAME}}]]<br /> <br /> &lt;!-- These are the inter-language links for templates in other languages corresponding to [[Template:!]] --&gt;<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 /> [[ur:سانچہ:!]]<br /> &lt;/includeonly&gt;&lt;noinclude&gt;<br /> <br /> &lt;!-- These are the inter-language links for the documentation subpage [[Template:!/doc]], not for the template itself. --&gt;<br /> [[ar:قالب:!/شرح]]<br /> [[as:সাঁচ:!/doc]]<br /> [[cs:Šablona:!/doc]]<br /> [[de:Vorlage:!/Doku]]<br /> [[es:Plantilla:!/doc]]<br /> [[fr:Modèle:!/Documentation]]<br /> [[or:ଟେମ୍ପଲେଟ:!/doc]]<br /> [[ro:Format:!/doc]]<br /> [[ru:Шаблон:!/doc]]<br /> &lt;/noinclude&gt;</div> Adriweb