Help:Using templates: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
(Created page with "{{NavWiki|help}} {{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. == How to use templates == === Adding templates to pages === ==== Visual editor ==== File:visual_editor_template.png|right|thumb|Inserting a template with the Visual Editor...")
 
No edit summary
Line 69: Line 69:
== See also ==
== See also ==
* [https://www.mediawiki.org/wiki/Help:Templates MediaWiki Help:Templates]
* [https://www.mediawiki.org/wiki/Help:Templates MediaWiki Help:Templates]
* [[Help:Template quick reference|Template quick reference]]
* [[Help:Template Quick Reference|Template Quick Reference]]


[[Category: Wiki Help]]
[[Category: Wiki Help]]

Revision as of 11:32, 20 October 2023

Bgwiii.png IndexGuidesModdingDiscord

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.


How to use templates

Adding templates to pages

Visual editor

Inserting a template with the Visual Editor

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 ({{ ... }}. For example, the template moo is added by typing (moo.

A template's parameters are specified through the use of pipes (|).

  • Template with one parameter:
    • Code: {{enchantment|+1}}
    • Result: Enchantment: + 1
  • Template with multiple parameters:
    • Code: {{AttributeBlock|8|15|7|6|10|8|hp=12|dex save = yes|race=Bird|hp=10}}
    • Result:

STR

8
(-1)

DEX

15
(+2)

CON

7
(-2)

INT

6
(-2)

WIS

10

CHA

8
(-1)

Creature Race Icon.png Race

Bird

HP Icon.png Hit Points

10

Page creation

Templates can take input in the form of standard parameters and use it to generate a pre-formatted page.

Examples

Infoboxes

Examples

Pre-formatted information

Examples

Iconz

Examples

Navboxes

Examples

Pre-formatted text

Examples

See also