الگو:!
|
| این الگو در 5,700,000+ صفحه استفاده شدهاست. To avoid large-scale disruption and unnecessary server load, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please consider discussing any changes on the talk page before implementing them. |
این یک الگوی کمکیاست و به کمک آن میتوان نویسهٔ «|» را در کدهای ویکی وارد کرد.
Usage
This is the {{!}} meta-template. Its use is analogous to an escape character.
This is an auxiliary template allowing the encoding of "|" 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 "|".
This template cannot be used for putting the character as text in a wiki table; in that case, again, "|" can be used.
Note that no special template is needed for "!" (exclamation mark).
This is a high-risk template, and it usually cannot be substituted (see conditions for substing on the section below).
Substitution
It is possible to substitute {{!}} only if an unescaped "|" works as expected, i.e. after substituting the template containing {{!}}, or after eliminating an #if containing {{!}}.
A simple example
The following template code for {{Quotation}} using an ordinary pipe character,
{{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]]}}
produces:
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
whereas this code using the {{!}} meta-template,
{{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]]}}
produces:
It is not possible to use an ordinary pipe character | in template parameters, as it will be interpreted as a separator.
See also
| توضیحات بالا از الگو:!/توضیحات به این صفحه آورده شدهاند. (ویرایش | تاریخچه) برای آزمایش این الگو به صفحهٔ تمرین (ایجاد | آینه) و نسخهٔ آزمایشی (ایجاد) بروید. لطفاً ردهها و میانویکیها را به زیرصفحهٔ /توضیحات بیفزایید. زیرصفحههای این الگو. |
| این صفحه به طور دائمی محافظت شدهاست. این الگو به علت حساسبودن و برای پیشگیری از خرابکاری محافظت شدهاست. تغییرات پیشنهادی خود را به اطلاع یکی از مدیران برسانید تا اعمال گردد. برای اطلاعات بیشتر به سیاست حفاظت از مقالات و سیاهه حفاظت نگاه کنید. برای تغییر دادن متن مقاله میتوانید تغییرتان را در صفحه بحث مقاله ذکر کنید تا مدیران آن را تغییر دهند. بهعلاوه میتوانید درخواست خارجشدن از محافظت این صفحه را مطرح نمایید. |