Template:Example/doc: Difference between revisions
Appearance
mNo edit summary |
Added no_copy parameter |
||
| Line 15: | Line 15: | ||
* {{F|1}} – Input wikitext. | * {{F|1}} – Input wikitext. | ||
** {{Color|Old|Note}}: Must be wrapped between {{F|<nowiki><nowiki></nowiki></nowiki>}}. | ** {{Color|Old|Note}}: Must be wrapped between {{F|<nowiki><nowiki></nowiki></nowiki>}}. | ||
* {{F|no_copy}} – Set to {{F|1}} to remove the copy button. | |||
* {{F|no_result}} – Set to {{F|1}} to hide the results. | * {{F|no_result}} – Set to {{F|1}} to hide the results. | ||
| Line 90: | Line 91: | ||
"label": "No result", | "label": "No result", | ||
"description": "Set to 1 to hide the results.", | "description": "Set to 1 to hide the results.", | ||
"type": "boolean" | |||
}, | |||
"no_copy": { | |||
"label": "No copy", | |||
"description": "Set to 1 to remove the copy button.", | |||
"example": "1", | |||
"type": "boolean" | "type": "boolean" | ||
} | } | ||
}, | }, | ||
"description": "Template that formats the input wikitext and the output from the parser when given some wikitext.", | "description": "Template that formats the input wikitext and the output from the parser when given some wikitext.", | ||
"format": "block" | "format": "block", | ||
"paramOrder": [ | |||
"1", | |||
"no_copy", | |||
"no_result" | |||
] | |||
} | } | ||
</templatedata> | </templatedata> | ||
Latest revision as of 11:35, 4 May 2026
This is the documentation page for Example. It contains usage information, categories, and other content not part of the original template page. | ||
|---|---|---|
| Main | Documentation | Usage |
This template uses Module:Example, a script written in Lua.
See also: Template:F
Template that formats the input wikitext and the output from the parser when given some wikitext.
See: Template:Example for the full documentation.
Syntax
[edit source]{{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
[edit source]{{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
[edit source]Template that formats the input wikitext and the output from the parser when given some wikitext.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Wikitext | 1 | Input wikitext. | Content | required |
| No copy | no_copy | Set to 1 to remove the copy button.
| Boolean | optional |
| No result | no_result | Set to 1 to hide the results. | Boolean | optional |