ထႅမ်းပလဵတ်ႉ:Nowiki template demo
Uses Lua: |
This template shows a template invocation together with a demonstration of that template's output. The template arguments are passed in once, inside <nowiki>...</nowiki>
tags, and are used to generate both the template invocation and the template output. The demonstration can be displayed in various different formats.
This template is identical to {{test case nowiki}} with the |showtemplate2=
and |showheader=
parameters both set to "no". To see the full range of options available, please see the test case nowiki documentation.
လၢႆးၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]ပိူင်တႅမ်ႈ ပိုၼ်ႉထၢၼ်
[မႄးထတ်းငဝ်ႈငႃႇ]{{nowiki template demo|<nowiki>{{[template name] | [param1] = [value1] | [param2] = [value2] | [param3] = [value3] ... }}</nowiki>}} Or {{nowiki template demo|<nowiki>{{<!-- template name with parameters -->}}</nowiki>}}
ပိူင်တႅမ်ႈ ဢၼ်ၸႂ်ႉၵမ်ႉၼမ်
[မႄးထတ်းငဝ်ႈငႃႇ]The following options will work with all different test case formats.
{{nowiki template demo | format = | collapsible = | resetRefs = | showcode = | showheader = | code = <nowiki>{{[template name] | [param1] = [value1] | [param2] = [value2] | [param3] = [value3] ... }}</nowiki> }}
Some test case formats accept additional parameters as well. See their sections for documentation.
ပႃႇရႃႇမီႇတႃႇ
[မႄးထတ်းငဝ်ႈငႃႇ]Parameter | Description |
---|---|
code or 1 |
The template code, inside <nowiki>...</nowiki> tags. You must use the magic word "__TEMPLATENAME__" instead of the template name. For example: | code = <nowiki>{{__TEMPLATENAME__|first|second|foo=bar}}</nowiki> . Note: due to the way nowiki tags work, the template treats the HTML entities <, > and " as if they were the literal characters <, > and " when used with this parameter. |
format |
The format to display the test cases in. This can be "default", "inline", "columns" or "rows". The inline format is for templates that can be displayed entirely on one line. If used with templates that display on multiple lines it may produce unexpected results. The "columns" and "rows" formats are intended for displaying multiple templates in a table, so they are not of much use here. See the test case nowiki documentation for more information about them. |
heading1 |
A custom heading for the template. |
showheader |
If this is set to "no", then no headers are shown. |
collapsible |
If set to "yes", the demonstration is made collapsible. It is collapsed by default. |
resetRefs |
If set to "yes", any references generated by the templates tested are reset after each template is expanded. |
showcode |
Set this to "no" to disable display of the template invocation. |
You can use |collapsible=yes
with any format to collapse it. You can set a custom title for collapsible test cases with the |title=
parameter.
တူဝ်ယၢင်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]ပိူင်ၵႅဝ်ႈ
[မႄးထတ်းငဝ်ႈငႃႇ]လၢႆးၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]{{nowiki template demo|code=<nowiki>{{ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}}</nowiki>}}
ၽွၼ်းဢွၵ်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]လွင်ႈၽိတ်းပိူင်ႈ Lua: expandTemplate: template loop detected.
Default, collapsible
[မႄးထတ်းငဝ်ႈငႃႇ]လၢႆးၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]{{nowiki template demo|collapsible=yes|<nowiki>{{ombox|text=Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}}</nowiki>}}
ၽွၼ်းဢွၵ်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]လွင်ႈၽိတ်းပိူင်ႈ Lua: expandTemplate: template loop detected.
ၼႂ်းထႅဝ်
[မႄးထတ်းငဝ်ႈငႃႇ]using Template:3x
လၢႆးၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]{{nowiki template demo|format=inline|code=<nowiki>{{3x|Lorem ipsum}}</nowiki>}}
ၽွၼ်းဢွၵ်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]လွင်ႈၽိတ်းပိူင်ႈ Lua: expandTemplate: template loop detected.
Note: As this format starts with a bullet, a newline will always be inserted at the start of the template output due to bug 14974.
ၸႂ်ႉ ၼႂ်းထႅဝ် ၵိုၵ်းတင်း ၽွၼ်းဢွၵ်ႇ ဢၼ်ဢမ်ႇၸႂ်ႈဝီႇၶီႇ
[မႄးထတ်းငဝ်ႈငႃႇ]using Template:URL
လၢႆးၸႂ်ႉတိုဝ်း
[မႄးထတ်းငဝ်ႈငႃႇ]{{nowiki template demo|format=inline|output=nowiki+|code=<nowiki>{{URL | 1= http://www.example.com/path?section=17 }}</nowiki>}}
ၽွၼ်းဢွၵ်ႇ
[မႄးထတ်းငဝ်ႈငႃႇ]လွင်ႈၽိတ်းပိူင်ႈ Lua: expandTemplate: template loop detected.
လွင်ႈမၵ်းၶၢၼ်း ၵၢၼ်ထႅၵ်ႉ
[မႄးထတ်းငဝ်ႈငႃႇ]The template has the following known technical limitations:
- An error will be generated if processing the entire page takes more than 10 seconds. This is an intentional limit in the Scribunto extension that runs Module:Template test case, on which this template is based. If a test cases page takes more than 10 seconds to load, you may need to split it up into different pages.
- The template converts the HTML entities <, > and " inside template invocations to the literal characters <, > and ". This is due to the way nowiki tags work.
တူၺ်းပႃး
[မႄးထတ်းငဝ်ႈငႃႇ]Similar templates:
- Template:Demo and Template:Demo-inline which use Module:Demo
- Template:Automarkup which uses Module:Automarkup
Templates invoking Module:Template test case:
- Template:Test case – a generalised test case template
- Template:Testcase rows – for a table of test cases arranged in rows
- Template:Testcase table – for a table of test cases arranged in columns
- Template:Inline test case – for test cases with small invocations and small output
- Template:Collapsible test case – for test cases collapsed by default if the results are the same
ၽိုၼ်ၵႅမ်မိုဝ်းလၢႆးၸႂ်ႉတိုဝ်း (documentation)တီႈၽၢႆႇၼိူဝ်ၼႆႉ လုၵ်ႉတီႈ ထႅမ်းပလဵတ်ႉ:Nowiki template demo/doc သေ ၶၢႆႉသႂ်ႇၶဝ်ႈ (ႁဵတ်း transclude ဝႆႉၶႃႈဢေႃႈ။ (မႄးထတ်း | ပိုၼ်း) ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း ထႅမ်းပလဵတ်ႉဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း ထႅမ်းပလဵတ်ႉ ဢၼ်ၼႆႉ။. |