Template:Wn/shn/Dialog/init/doc
ဢၼ်ၼႆႉပဵၼ် ၽိုၼ်ၵႅမ်မိုဝ်း ၽႄ တွၼ်ႈတႃႇ Template:Wn/shn/Dialog/init (တူၺ်းၼႃႈလိၵ်ႈၼၼ်ႉ တွၼ်ႈတႃႇ template တူဝ်မၼ်း)။ မၼ်းၶဝ်ႈပႃး လွၼ်ႉၶၢဝ်ႇ လွင်ႈၸႂ်ႉတိုဝ်း၊ ပိူင်ထၢၼ်ႈ လႄႈ လမၼ်းၼႂ်းတၢင်ႇၸိူဝ်း ဢၼ်ဢမ်ႇၸႂ်ႈ ပွတ်းတွၼ်ႈၶွင် template ၼႃႈလိၵ်ႈ ငဝ်ႈတိုၼ်းမၼ်း။ |
This is a dialog formatting template. It is meant for use on interactive dialog pages, and may involve interactions between wiki markup, html, and javascript. Please carefully test any edits before making them. |
လွင်ႈၸႂ်ႉတိုဝ်း
Use this template on a page to be accessed via dialog action do to specify initial values for one or more dialog fields. For a single field, specify thus:
- {{Wn/shn/Dialog/init|name|value}}
This causes value to be processed through template-expansion, and the resulting value to be associated with dialog field name, as if it had been provided as an incoming dialog parameter, and overriding any dialog parameter name provided. This bypasses the ordinary processing by which the wiki software converts the output of template-expansion into html for viewing; the ordinary processing rearranges whitespace, linebreaks, and markup for list items, indentation, italics, wikilinks, and so on. Some, but not all, of the ordinary processing can be avoided by means of {{Wn/shn/Dialog/safe}}.
Ordinarily, the template call itself expands to the empty string. However, a non-blank third parameter causes the template call to expand to value.
The template call must appear on the accessed page itself, as it is processed by the do action before template-expansion of the page as a whole. This enhances security since arbitrary templates used on the dialog page cannot indirectly override dialog parameter values.
The value may contain template parameters processed by the do action (such as SUBJECT-CONTENT
, or incoming dialog parameters), as the action replaces those before processing calls to {{Wn/shn/Dialog/init}}. Because those template parameters are processed before {{Wn/shn/Dialog/init}} calls, they depend on incoming dialog parameters only, regardless of value or of any other call to {{Wn/shn/Dialog/init}}. The specified value will, however, override any incoming dialog parameter to determine the initial content of a dialog field called name.
Reserved parameter names — anything that starts with an upper-case letter and does not contain any lower-case letters — cannot be overridden using {{Wn/shn/Dialog/init}}; any attempt to do so is ignored.
The number of calls to this template should be minimized, as processing each of them may entail a separate communication across the internet to the wiki server (though the dialog software will save itself the trouble if it notices value doesn't contain any template calls). As of this writing, only up to eight calls to this template are processed by action do; any additional calls do not affect dialog fields. Multiple dialog fields can be handled in a single call to this template by using a compound definiend: The first template parameter is a list of one or more field names, delimited by parentheses and separated by whitespace, and the second template parameter should template-expand to a Wikilisp-style list of string literals. The names are bound to the values represented by the string literals.
If a parameter provided through {{Wn/shn/Dialog/init}} is meant to be explicitly passed by a button (rather than implicitly passed by delegation), there has to be a dialog field on the page with the name of that parameter (typically declared using {{Wn/shn/Dialog/textarea|hidden=1}}); explicit button parameters are always taken from dialog fields, not from incoming dialog parameters.
Technical restrictions
The value must not contain any unmatched braces ({
or }
) and must not have braces nested more than 32 deep (as of this writing). The unbalanced-braces problem can be avoided by using {{Wn/shn/(*}} and {{Wn/shn/*)}}. If these limtations are exceeded, the template call does not affect dialog fields (because the dialog software fails to recognize it in the raw wiki markup).
တူၺ်းပႃး