Help:Editing basics: Difference between revisions

Jump to navigation Jump to search
Line 34: Line 34:


== Templates ==
== Templates ==
{{hatnote|For a list of all commonly used templates, see [[Help:List of templates]].}}
A ''template'' is a special type of page designed to be included within other pages. Templates are used extensively on BG3Wiki.
The [[Help:Using templates|next step]] of this manual will cover specific uses of templates.
=== Adding templates using the visual editor ===
<gallery>
<gallery>
File:visual_editor_template.png|thumb|100px|Adding templates using the visual editor.
File:visual_editor_template.png|thumb|100px|Adding templates using the visual editor.
</gallery>
</gallery>
A ''template'' is a special type of page designed to be included within other pages. Templates are used extensively on BG3Wiki. Luckily, using templates is easy, and the next step of this guide ([[Help:Using templates|Using templates]]) will cover the basics of template usage on BG3Wiki.
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.
 
=== Adding templates using the source editor ===
Templates are added by using double brackets ({{code|<nowiki>{{ ... }}</nowiki>}}. For example, the template {{code|foo}} is added by typing ({{code|<nowiki>foo</nowiki>}}.


Templates are added using double brackets ({{code|<nowiki>{{...}}</nowiki>}}).
A template's parameters are specified through the use of pipes {{code|(<nowiki>|</nowiki>)}}.


For a list of all commonly used templates, see [[Help:List of templates]].
* Template with one parameter:
** Code: {{code|<nowiki>{{enchantment|+1}}</nowiki>}}
** Result: {{enchantment|+1}}
* Template with multiple parameters:
** Code: {{code|<nowiki>{{AttributeBlock|8|15|7|6|10|8|hp=12|dex save = yes|race=Bird|hp=10}}</nowiki>}}
** Result:
{{AttributeBlock|8|15|7|6|10|8|hp=12|dex save = yes|race=Bird|hp=10}}


== Categories ==
== Categories ==