837
editsMore actions
m
no edit summary
mNo edit summary |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{hatnote|This article is an introduction to using templates. For a more technical guide, see [[Help:Templates]]. For a list of all commonly used templates, see [[Help:List of templates]].}} | |||
{{NavWiki|help}} | {{NavWiki|help}} | ||
A '''template''' is a special type of page designed to be embedded within other pages, providing editors with access to consistent design and formatting. | |||
A ''' | |||
== Adding templates to pages == | |||
=== Via the 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 searched 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. | ||
=== | === Via the source editor === | ||
Templates are added by using double brackets | 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| | A template's parameters are specified through the use of pipes {{code|<nowiki>|</nowiki>}}. | ||
* Template with one parameter: | * Template with one parameter: | ||
Line 18: | Line 17: | ||
** Result: {{enchantment|+1}} | ** Result: {{enchantment|+1}} | ||
* Template with multiple parameters: | * Template with multiple parameters: | ||
** Code: {{code|<nowiki>{{AttributeBlock|8|15|7|6|10|8 | ** Code: {{code|<nowiki>{{AttributeBlock|8|15|7|6|10|8|dex save = yes|race=Bird|hp=10}}</nowiki>}} | ||
** Result: | ** Result: | ||
{{AttributeBlock|8|15|7|6|10|8 | {{AttributeBlock|8|15|7|6|10|8|dex save = yes|race=Bird|hp=10}} | ||
=== | == Specific uses of templates == | ||
=== Adding navigation to pages === | |||
==== Hatnotes ==== | |||
When an article is of a similar, but distinct, subject to another, the [[Template:Hatnote|Hatnote]] template can be used to add a note at the top of an article with a link to the other article. | |||
==== | ==== Disambiguation pages ==== | ||
The [[Template:Disambig|Disambig]] template can be used to create disambiguation pages when there are multiple articles with the same name. | |||
=== | ==== Navboxes ==== | ||
Many pages on BG3Wiki makes use of "navboxes" to create navigation between pages of related topics. A full list of navboxes can be found here: [[Help:List of templates#Navboxes|Navboxes]]. | |||
=== | === Page creation === | ||
Templates can take input in the form of standard parameters and use it to generate a pre-formatted page. | |||
== See also == | == See also == |