Template:Demo/testcases
This is the template test cases page for the sandbox of Template:Demo. to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki; see the HTML comment "NewPP limit report" in the rendered page. You can also use Special:ExpandTemplates to examine the results of template uses. You can test how this page looks in the different skins and parsers with these links: |
{{Demo}}
==Some templates==
{{tl|template}}, {{=}}, {{!}}
{{payoff matrix
| UL = 5
| UR = 7
| DL = 2
| DR = 9
| Name = Example usage
}}
==Some parser functions==
{{#ifeq: a | a | true | false}}
{{#time: U }}
==Some special characters==
{}[]<>|"'
==Some markup==
[[wikilink]]
[https://en.wikipedia.org link]
'''bold''' ''italics''
* item
{| class="wikitable"
! header
|-
| cell
|}
==Some tags==
<b>bold</b>
<span style="font-style: italic;">italics</span>
<pre>{{tl|template}}</pre>
<syntaxhighlight lang="wikitext">{{tl|template}}</syntaxhighlight> <ref>reference</ref>
<references />
==Some entities==
<>" {|}
Some templates
[edit]{{template}}, =, |
Left | Right | |
Up | 5 | 7 |
Down | 2 | 9 |
Example usage |
Some parser functions
[edit]true 1731178921
Some special characters
[edit]{}[]<>|"'
Some markup
[edit]- item
header |
---|
cell |
Some tags
[edit]bold italics
{{tl|template}}
{{tl|template}}
- ^ reference
Some entities
[edit]<>" {|}
{{Demo/sandbox}}
- Using this code:
==Some templates== {{tl|template}}, {{=}}, {{!}} {{payoff matrix | UL = 5 | UR = 7 | DL = 2 | DR = 9 | Name = Example usage }} ==Some parser functions== {{#ifeq: a | a | true | false}} {{#time: U }} ==Some special characters== {}[]<>|"' ==Some markup== [[wikilink]] [https://en.wikipedia.org link] '''bold''' ''italics'' * item {| class="wikitable" ! header |- | cell |} ==Some tags== <b>bold</b> <span style="font-style: italic;">italics</span> <pre>{{tl|template}}</pre> <syntaxhighlight lang="wikitext">{{tl|template}}</syntaxhighlight> <ref>reference</ref> <references /> ==Some entities== <>" {|}
- yields:
-
Some templates
[edit]{{template}}, =, |
Left Right Up 5 7 Down 2 9 Example usage Some parser functions
[edit]true 1731178921
Some special characters
[edit]{}[]<>|"'
Some markup
[edit]- item
header cell Some tags
[edit]bold italics
{{tl|template}}
[1]{{tl|template}}
- ^ reference
Some entities
[edit]<>" {|}
{{demo}}
<b>bold</b>
<span style="font-style: italic;">italics</span>
<pre>{{tl|template}}</pre>
<syntaxhighlight lang="wikitext">{{tl|template}}</syntaxhighlight> <ref>reference</ref>
<references />
bold italics
{{tl|template}}
{{tl|template}}
- ^ reference
{{demo/sandbox}}
- Using this code:
<b>bold</b> <span style="font-style: italic;">italics</span> <pre>{{tl|template}}</pre> <syntaxhighlight lang="wikitext">{{tl|template}}</syntaxhighlight> <ref>reference</ref> <references />
- yields:
-
bold italics
{{tl|template}}
[1]{{tl|template}}
- ^ reference
{{demo inline}}
{{tlp|template|a{{=}}b}}
→ {{template|a=b}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
{{Demo}}
{{tl|template}}
{{Demo/sandbox}}
- Using this code:
{{tl|template}}
- yields:
- {{template}}
<br>
{{Demo}}
{{tl|template}}
{{template}}
{{Demo/sandbox}}
- Using this code:
{{tl|template}}
- yields:
- {{template}}
<br>
s{{Demo}}
{{tl|template}}
{{template}}
{{Demo/sandbox}}
- Using this code:
{{tl|template}}
- yields:
- {{template}}
|sep=produces
{{Demo}}
{{tl|template}}
{{Demo/sandbox}}
- Using this code:
{{tl|template}}
- yields:
- {{template}}
|sep=produces
{{demo inline}}
{{tlp|template|a{{=}}b}}
produces {{template|a=b}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
|br=1
{{demo inline}}
{{tlp|template|a{{=}}b}}
{{template|a=b}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
|sep=<br>
{{demo inline}}
{{tlp|template|a{{=}}b}}
{{template|a=b}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
|sep=<td>
{{demo}}
{{tlp|template|a{{=}}b}}
| {{template|a=b}}
|
{{demo/sandbox}}
|
|reverse=1
{{demo}}
{{template|a=b}}{{tlp|template|a{{=}}b}}
{{demo/sandbox}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
|reverse=1
{{demo inline}}
{{template|a=b}} ← {{tlp|template|a{{=}}b}}
- Using this code:
{{tlp|template|a{{=}}b}}
- yields:
- {{template|a=b}}
{{demo}}
* Item
* Item
- Item
{{demo/sandbox}}
- Using this code:
* Item * Item
- yields:
- * Item
- Item
{{demo}}
{| class="wikitext"
| Hello!
|}
| Hello! |}
{{demo/sandbox}}
- Using this code:
{| class="wikitext" | Hello! |}
- yields:
- {| class="wikitext"
| Hello!
|}
{{demo}}
{| class="wikitext"
| Hello!
|}
Hello! |
{{demo/sandbox}}
- Using this code:
{| class="wikitext" | Hello! |}
- yields:
-
Hello!
|demo_module=
etc.{{demo}}
{{#invoke:Demo|module|demo_module=RoundN|demo_module_func=N2|demo_template=Round2
|bold_winner=high
|May 1|Team A|1|Team B|2
}}
{{Round2
|bold_winner=high
|May 1|Team A|1|Team B|2
}}
Final | ||
May 1 | ||
Team A | 1 | |
Team B | 2 | |
{{demo/sandbox}}
- Using this code:
{{#invoke:Demo|module|demo_module=RoundN|demo_module_func=N2|demo_template=Round2 |bold_winner=high |May 1|Team A|1|Team B|2 }}
- yields:
{{Round2 |bold_winner=high |May 1|Team A|1|Team B|2 }}
Final May 1 Team A 1 Team B 2
{{demo}}
\{\{[[Template:Notice|Notice]]\pHello there!\}\}
{{demo/sandbox}}
- Using this code:
{{[[Template:Notice|Notice]]|Hello there!}}
- yields:
Hello there!
{{demo}}
<code>{{[[Template:Notice|notice]]|Hello there!}}</code>
{{notice|Hello there!}}
{{demo/sandbox}}
- Using this code:
<code>{{[[Template:Notice|notice]]|Hello there!}}</code>
- yields:
Hello there!
{{demo}}
<code>{{[[Template:Tlx|tlx]]|notice|Hello there!}}</code>
{{tlx|notice|Hello there!}}
{{demo/sandbox}}
- Using this code:
<code>{{[[Template:Tlx|tlx]]|notice|Hello there!}}</code>
- yields:
{{notice|Hello there!}}
{{demo}}
<code>{{[[Template:Tlx|tlx]]|notice|Hello there!}}</code>
{{tlx|notice|Hello there!}}
{{demo/sandbox}}
- Using this code:
<code>{{[[Template:Tlx|tlx]]|notice|Hello there!}}</code>
- yields:
{{tlx|notice|Hello there!}}
{{demo}}
&#123;&#123;notice&#124;Hello there!&#125;&#125;
{{demo/sandbox}}
- Using this code:
&#123;&#123;notice&#124;Hello there!&#125;&#125;
- yields:
- {{notice|Hello there!}}