Template:Example/doc

Revision as of 11:35, 4 May 2026 by Stevium (talk | contribs) (Added no_copy parameter)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This is the documentation page for Example.
It contains usage information, categories, and other content not part of the original template page.
This template uses Module:Example, a script written in Lua.

Template that formats the input wikitext and the output from the parser when given some wikitext.

See: Template:Example for the full documentation.

Syntax

{{Example|<nowiki>

</nowiki>}}

This template has 1 unnamed parameter:

  • 1 – Input wikitext.
    • Note: Must be wrapped between <nowiki></nowiki>.
  • no_copy – Set to 1 to remove the copy button.
  • no_result – Set to 1 to hide the results.

Example

{{Example|<nowiki>
{{Navbox
|title = Items
|striped = even
|editlinks = off
|above = Some items are restricted to specific classes; see Classes for more information.
|below = Update 1.2
|below_class = align-right

|group1 = Consumables
|list1 =
* Health Potion
* Mana Potion

|group2 = Weapons
|group2.1 = Swords
|list2.1 =
* Wooden Sword
* Rusted Sword
* Steel Sword
|group2.2 = Bows
|list2.2 =
* Shortbow
* Crossbow
* Longbow
}}
</nowiki>}}

The above wikitext will be rendered as:

{{Navbox
|title = Items
|striped = even
|editlinks = off
|above = Some items are restricted to specific classes; see Classes for more information.
|below = Update 1.2
|below_class = align-right

|group1 = Consumables
|list1 =
* Health Potion
* Mana Potion

|group2 = Weapons
|group2.1 = Swords
|list2.1 =
* Wooden Sword
* Rusted Sword
* Steel Sword
|group2.2 = Bows
|list2.2 =
* Shortbow
* Crossbow
* Longbow
}}

Template Data

Template that formats the input wikitext and the output from the parser when given some wikitext.

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Wikitext1

Input wikitext.

Contentrequired
No copyno_copy

Set to 1 to remove the copy button.

Example
1
Booleanoptional
No resultno_result

Set to 1 to hide the results.

Booleanoptional