Help:Using templates: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
 
(3 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}}
{{nav button|right|Help: Uploading files|Uploading files|noclear=1|padding=1%}}
A '''template''' is a special type of page designed to be embedded within other pages, providing editors  with access to consistent design and formatting.
{{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.
 
A '''template''' is a special type of page designed to be included within other pages. Templates are used extensively on BG3Wiki.


== Adding templates to pages ==
== Adding templates to pages ==
Line 15: Line 9:


=== Via the source editor ===
=== Via 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 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 23: 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|hp=12|dex save = yes|race=Bird|hp=10}}</nowiki>}}
** 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|hp=12|dex save = yes|race=Bird|hp=10}}
{{AttributeBlock|8|15|7|6|10|8|dex save = yes|race=Bird|hp=10}}


== Specific uses of templates ==
== Specific uses of templates ==

Navigation menu