Your IP address will be publicly visible if you make any edits.
Template:Template demo
Template page
More actions
Template documentation
This template is designed to easily demo template usage and is intended for use within template documentation pages. It lets you display a set of template examples with the markup and rendered output displayed side-by-side.
Usage
This template has three styles: a two-column table (style = table), a list (style = list), or a tabbed(style = tabbed). The table is appropriate for shorter, inline templates. For larger templates, the list style may be preferred. For exceptionally long templates like page generators, tabbed style may be preferred.
As with Template:Demo, the arguments to this template must be wrapped in <nowiki>...</nowiki> tags or the parameters will be expanded before being passed to this template.
Examples
Table style
Select this style with style = table. It is also the default style used if the optional style parameter is omitted. This style should be used for shorter, inline templates that can fit nicely within a two-column table.
Input
{{Template demo
| style = table
| <nowiki>{{CharLink|Shadowheart}}</nowiki>
| <nowiki>{{DamageText|2d4 + 1|Fire}}</nowiki>
| <nowiki>{{RarityItem|Hat of Fire Acuity}}</nowiki>
| <nowiki>{{SAI|Fireball}}</nowiki>
}}
Select this style with style = list. This should be used to demo templates too large to fit within a table. You can also optionally caption the examples as with the table style.
Input
{{Template demo
| style = list
| <nowiki>
{{Quote fancy
| quote = The operations of these huge steel juggernauts are powered by engines of churning hellfire.
| image = Portrait Steel Watcher.png
| link = Adamantine Golem
}}
</nowiki>
| caption 2 = This example demonstrates many of the optional style parameters.
| <nowiki>
{{Quote fancy
| quote = These levitating eyes transmit all that they see to the one who created them.
| image = Portrait Scrying Eye.png
| link = Scrying Eye
| height = 60
| rounding = 20%
| font-size = 100%
}}
</nowiki>
}}
Output
Markup
{{Quote fancy
| quote = The operations of these huge steel juggernauts are powered by engines of churning hellfire.
| image = Portrait Steel Watcher.png
| link = Adamantine Golem
}}
The operations of these huge steel juggernauts are powered by engines of churning hellfire.
„
This example demonstrates many of the optional style parameters.
Markup
{{Quote fancy
| quote = These levitating eyes transmit all that they see to the one who created them.
| image = Portrait Scrying Eye.png
| link = Scrying Eye
| height = 60
| rounding = 20%
| font-size = 100%
}}
These levitating eyes transmit all that they see to the one who created them.
„
Tabbed style
Select this style with style = tabbed. Tabbed style is good for exceptionally long templates such as page generators.
Input
{{Template demo
| style = tabbed
| <nowiki>
{{Quote fancy
| quote = The operations of these huge steel juggernauts are powered by engines of churning hellfire.
| image = Portrait Steel Watcher.png
| link = Adamantine Golem
}}
</nowiki>
| <nowiki>
{{Quote fancy
| quote = These levitating eyes transmit all that they see to the one who created them.
| image = Portrait Scrying Eye.png
| link = Scrying Eye
| height = 60
| rounding = 20%
| font-size = 100%
}}
</nowiki>
}}
Output
Markup
{{Quote fancy
| quote = The operations of these huge steel juggernauts are powered by engines of churning hellfire.
| image = Portrait Steel Watcher.png
| link = Adamantine Golem
}}
The operations of these huge steel juggernauts are powered by engines of churning hellfire.
„
Markup
{{Quote fancy
| quote = These levitating eyes transmit all that they see to the one who created them.
| image = Portrait Scrying Eye.png
| link = Scrying Eye
| height = 60
| rounding = 20%
| font-size = 100%
}}
These levitating eyes transmit all that they see to the one who created them.
„
Template data
Display a list of template examples that displays the source wikitext and rendered result side-by-side. The template supports an arbitrary number of examples as unnamed arguments.