FFXIV Wiki:Templates

From Final Fantasy XIV Online Wiki
Jump to navigation Jump to search

Community portalHelp & editingStyle guideTo-Do ListHistorical


What are Templates?

Templates are standard wiki pages whose content is designed to be transcluded (embedded) inside other pages.[1]

In the Visual Editor, clicking on an embedded Template will show a pop-up mentioning what Template it is, and an 'Edit' button to edit the template contents.

In the Source Editor, Templates can be identified by the way they're wrapped in double {{curly brackets}}

All templates can be found in Category:Templates.

General

Templates in general share some simple rules:

  • They provide some parameters that you can enter, and these parameters are formatted before displaying.
    • Parameters may also be used to annotate information through SMW, and to generate categories.
      • Parameters are passed within a template call and between pipes (|).
      • There are two types of parameter:
        • named – it has an explicit name and value separated by an equal sign (=) such as {{Greenify text|text=Hello}}
        • unnamed – it assumes each value passed between pipes (|) to be a parameter such as {{Greenify texts|Hello|Greenify|All|Text}}
  • Each template should have its own documentation with examples of how to use it.

Types of Templates

Infoboxes

Quest infobox example
Example of a {{Quest infobox}}

Infoboxes are templates which displays a concise, formatted infobox to the side of the page with various information regarding the page subject. They are intended to be at the start of the page.

Note that not all data regarding a subject should be in the infobox because they're meant to cover common, small information, not every single detail. If the infobox doesn't contain some information then it should be discussed with the community/moderators if that piece of information should belong to the infobox; in most cases, information with a lot of text should be placed within a section.

Important! Always make it so that the page name matches the subject's corresponding image name, and make sure the extension is properly used. For example, if you're using an NPC infobox, it will default the image to the page name plus ".jpg" (jpg extension), while an action or trait infobox will default to page name plus ".png" (png extension).

Read the template documentation to understand what parameters are required/expected. In case the subject name/title follows the default page name, and the page name contains disambiguation details (eg. parentheses in case of multiple actions with the same name for different classes/jobs), do provide the name/title parameter so the wiki knows how to save the correct, canonical name, instead of the page name.

For example: Standard Touch (alchemist), Standard Touch (culinarian) and Standard Touch (armorer).

Data templates

Data templates manipulate and retrieve data for use in a page, such as {{Item reward}}.

Formatting templates

Formatting templates alter the display of information to a preset format.

Global variable templates

Global variable templates hold global variables for use on other pages. These templates are used so that multiple pages can be updated during expansion and patch releases simply by changing the value on the relevant template.

Hatnote templates

Hatnote templates render "hatnotes" at the top of an article or section. See Wikipedia's "Hatnote" page for more information on what hatnotes are, and how they're used.

Icon templates

Icon templates are used to render various icons in page, such as Potion.

Image templates

Image templates are used for formatting images, particularly for use in galleries.

Maintenance templates

Maintenance templates are used to flag information or pages that need maintenance.

Navigation templates are used to create groupings of links for related pages to facilitate navigation between those pages.

Notice templates

Notice templates are used for calling out important information at the start of a page, such as if the content is retired or not yet released.

Semantic result templates

Semantic result templates are used to output results using Semantic Media query.

Subobject templates

Subobject templates are used to create subobjects, a function of Semantic MediaWiki.

Table templates

Table templates are used to format tables.

Utility Templates

Utility Templates are used for various tasks including marking pages for deletion, circumventing syntax errors, etc.

Notes