8,856
editsHelp:Templates: Difference between revisions
Jump to navigation
Jump to search
no edit summary
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{NavWiki|template}} | {{NavWiki|template}} | ||
{{hatnote|This article is a technical guide to the use of templates on BG3Wiki. For a guide on how to use templates, see [[Help:Using templates]].}} | {{hatnote|This article is a technical guide to the use of templates on BG3Wiki. For a guide on how to use templates, see [[Help:Using templates]]. See [[Help:List of templates]] for a list of templates.}} | ||
A '''Template''' is a special type of page designed to be transcluded within other pages. Templates allow editors to automatically insert frequently-used images, code, and formatting on a page. We use templates extensively on BG3Wiki, as they allow the use of easily accessible and consistent design, layout and formatting. | A '''Template''' is a special type of page designed to be transcluded within other pages. Templates allow editors to automatically insert frequently-used images, code, and formatting on a page. We use templates extensively on BG3Wiki, as they allow the use of easily accessible and consistent design, layout and formatting. | ||
== Template creation == | == Template creation == | ||
Template creation is an essential part of the technical BG3Wiki workflow. However, it's important to take care when creating or improving templates. | |||
To create or edit templates you need access to them. This can be requested on the Discord or by visiting an admin's talk page. | |||
==== What to keep in mind ==== | |||
Ideally, new templates should be: | |||
# Easy to use, with as few parameters as possible. | |||
# Have clear and easy to understand [[Help: Template documentation|template documentation]] with examples. | |||
# Have easy to use TemplateData. | |||
=== Template documentation === | === Template documentation === | ||
{{hatnote|See also: [[Help: Template documentation]]}} | {{hatnote|See also: [[Help: Template documentation]]}} | ||
Line 13: | Line 23: | ||
Templates also allow the wiki to populate database tables with stored values using [[https://m.mediawiki.org/wiki/Extension:Cargo Cargo queries]. This allows the wiki to create automatically generated lists of items or spells. | Templates also allow the wiki to populate database tables with stored values using [[https://m.mediawiki.org/wiki/Extension:Cargo Cargo queries]. This allows the wiki to create automatically generated lists of items or spells. | ||
== | == Additional resources== | ||
* [https://www.mediawiki.org/wiki/Help:Templates MediaWiki Help:Templates] | * [https://www.mediawiki.org/wiki/Help:Templates MediaWiki Help:Templates] | ||
[[Category: Wiki Help]] | [[Category: Wiki Help]] |