Editing Help:Using templates
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{NavWiki|help}} | {{NavWiki|help}} | ||
A ''' | {{nav button|right|Help: Uploading files|Uploading files|noclear=1|padding=1%}} | ||
{{nav button|left|Help: Editing basics|Editing basics|noclear=1|padding=1%}} | |||
{{TocHelp}} | |||
{{clear}} | |||
{{hatnote|This article is a beginner friendly introduction to templates. For a more technical guide, see [[Help:Templates]].}} | |||
A '''Template''' is a special type of page designed to be embedded within other pages, providing editors with access to consistent design and formatting. | |||
== Adding templates to pages == | == How to use templates == | ||
=== | === Adding templates to pages === | ||
==== Visual editor ==== | |||
[[File:visual_editor_template.png|right|thumb|Inserting a template with the Visual Editor]] | [[File:visual_editor_template.png|right|thumb|Inserting a template with the Visual Editor]] | ||
Templates can be | Templates can be searches for and added via the toolbar above the visual editor by clicking ''''Insert''', and in the dropdown box, selecting '''Templates'''. Most templates can be easily inserted onto a page this way. To later edit its contents, simply click on the inserted template in the visual editor for options. | ||
=== | ==== Source editor ==== | ||
Templates are added by using double brackets {{code|<nowiki>{{ ... }}</nowiki>}}. For example, the template {{code|foo}} is added by typing {{code|<nowiki> | Templates are added by using double brackets ({{code|<nowiki>{{ ... }}</nowiki>}}. For example, the template {{code|foo}} is added by typing ({{code|<nowiki>foo</nowiki>}}. | ||
A template's parameters are specified through the use of pipes {{code|<nowiki>|</nowiki>}}. | A template's parameters are specified through the use of pipes {{code|(<nowiki>|</nowiki>)}}. | ||
* Template with one parameter: | * Template with one parameter: | ||
Line 17: | Line 22: | ||
** Result: {{enchantment|+1}} | ** Result: {{enchantment|+1}} | ||
* Template with multiple parameters: | * Template with multiple parameters: | ||
** Code: {{code|<nowiki>{{AttributeBlock|8|15|7|6|10|8|dex save = yes|race=Bird|hp=10}}</nowiki>}} | ** Code: {{code|<nowiki>{{AttributeBlock|8|15|7|6|10|8|hp=12|dex save = yes|race=Bird|hp=10}}</nowiki>}} | ||
** Result: | ** Result: | ||
{{AttributeBlock|8|15|7|6|10|8|dex save = yes|race=Bird|hp=10}} | {{AttributeBlock|8|15|7|6|10|8|hp=12|dex save = yes|race=Bird|hp=10}} | ||
=== Adding navigation to pages === | === Adding navigation to pages === | ||
==== Hatnotes ==== | ==== Hatnotes ==== |