Jump to content

Useful Templates: Difference between revisions

From Book of Avalikin
No edit summary
No edit summary
Line 22: Line 22:


= Templates =
= Templates =
== Disclaimer: Unofficial ==
Inserts a disclaimer stating that the current page is not yet official lore. Including this template is '''required''' on pages that have not yet been approved by lorekeepers. Please use the template for this in case the wording of the disclaimer needs to be updated in the future.
=== Usage ===
<nowiki>{{Unofficial}}</nowiki>
=== Output ===
{{Unofficial}}
== Disclaimer: WiP ==
Inserts a disclaimer stating that the current page is still being worked on. It usually always accompanies the "Unofficial" disclaimer. There is one required parameter, which is a link to a thread on the project discord server where the topics of the page may be discussed.
=== Example Usage ===
<nowiki>{{DiscordLink|https://discord.com/channels/1300333648519888926/1326470053566353458}}</nowiki>
=== Output ===
{{DiscordLink|https://discord.com/channels/1300333648519888926/1326470053566353458}}


== Plainlist ==
== Plainlist ==

Revision as of 15:10, 13 May 2025

This page exists to document useful wiki templates you may wish to use in your pages. This is not intended to be an exhaustive list of all templates, only the ones that are likely to be used directly by writers in wiki pages.

Basic Template Usage

To use a template in a page, you have to switch to "Source Editing" mode, which is the dropdown at the pencil-icon in the top-right corner of the edit box.

Basic template usage has the name of the template surrounded in double curly brackets on either side:

{{Template Name}}

(Template names may contain spaces)

A lot of templates take arguments, which may be optional, and may have to be of a specific type (i.e. String vs. Number).

An example of a parametrized template would be:

{{Template Name|First Parameter|3.14159}}

If a template has a lot of parameters, it is possible (or even required) to refer to them by name to avoid confusion. For instance, imagine a template with parameters called "name", "title" and "description". It could then be used like this:

{{Template Name
 | name = Test
 | title = Hello there!
 | description = CHIRP!
}}

Templates

Disclaimer: Unofficial

Inserts a disclaimer stating that the current page is not yet official lore. Including this template is required on pages that have not yet been approved by lorekeepers. Please use the template for this in case the wording of the disclaimer needs to be updated in the future.

Usage

{{Unofficial}}

Output

Currently unofficial lore, and in progress.

Disclaimer: WiP

Inserts a disclaimer stating that the current page is still being worked on. It usually always accompanies the "Unofficial" disclaimer. There is one required parameter, which is a link to a thread on the project discord server where the topics of the page may be discussed.

Example Usage

{{DiscordLink|https://discord.com/channels/1300333648519888926/1326470053566353458}}

Output

This page is WiP, you can contribute to its writing by discussing in its thread


Plainlist

This template provides a WCAG/ISO-standards-compliant accessible alternative to regular lists as they can be created in the editor. List items may be plain text, formatted text, or links.

Example Usage

{{plainlist|
* [[Valaya]]
* [[Magnus]]
* [[Edith]]
* [[Frost]]
* '''BOLD TEXT'''
}}

Example Output

Bulleted List

Similar to the previous template, but puts bullet points before each list items.

Example Usage

{{bulleted list|[[Valaya]]|[[Infernum]]|[[Edith]]|[[Frost]]|'''BOLD TEXT'''}}

Example Output

Ordered List

Similar to the previous template, but it numbers the entries instead of using bullet points. The parameter "type" determines how the numbering is done. The default is decimal. For a full list, see the documentation at MDN Web Docs.

If the list has to start with a number other than 1, use the "start" parameter and specify the starting numeral.

Example Usages

{{ordered list|[[Valaya]]|[[Infernum]]|[[Edith]]|[[Frost]]|'''BOLD TEXT'''}}
{{ordered list|type=lower-roman|[[Valaya]]|[[Infernum]]|[[Edith]]|[[Frost]]|'''BOLD TEXT'''}}

Example Outputs


Horizontal List

This template creates responsive horizontal lists. It is recommended to use this template rather than placing links manually. List items may be plain text, formatted text, or links.

Example Usage

Giant planets ({{hlist|class=inline|[[Valaya|V]]|[[Infernum|I]]|[[Edith|E]]}}).

Example Output

Giant planets ().

Legend

Useful for map or diagram legends, this template inserts a single line of text labeled with a colored box.

Example Usage

{{legend|#7EA6E0|Valaya}}

Example Output

  Valaya

Infobox

This template provides a generic infobox. Infobox templates for more specific purposes may exist, or may be added to the wiki in the future, so check first if a box for what you need exists before using this template.

A infobox consists of a title, header, optional subheader followed by a number of header, label and content/datapoints. All parameters are optional, only add what you need.

The infobox may contain a header image after the text headers and sub-headers.

Example Usage

{{Infobox
 |name = Test Infobox
 |title = Test Infobox
 |above = Header Text
 |subheader = First subheader
 |subheader2 = Second subheader
 |image = [[File:Example.png|200px]]
 |caption = This is the caption shown below the image

 |headerstyle = background: #ff8833;
 |labelstyle = background: #fcaf79;

 |header1 = The first section
 |label1 = a
 |data2 = Content of the first section
 |header3 = The second section
 |label4 = A Label
 |data4 = Labeled content
 |belowstyle = background: #fcaf79;
 |below = Below text to finish things off
}}
Test Infobox
Header Text
First subheader
Second subheader
This is the caption shown below the image
The first section
Content of the first section
The second section
A LabelLabeled content
Below text to finish things off

Template Tricks

This section is intended to list some common ways to combine templates that our editors have found, which you are free to copy-paste and make use of in your own pages.

Image with List

[[File:Example.png|thumb|100px|{{bulleted list |one |two |three}}]]
  • one
  • two
  • three

Nested Lists

{{ordered list
|{{hlist|horizontal|list|here}}
|Sub-list Title<br>{{bulleted list|a|sub|list}}
|Normal List Item
}}
    • horizontal
    • list
    • here
  1. Sub-list Title
    • a
    • sub
    • list
  2. Normal List Item

Clear

By default, text will flow around certain templated elements, such as infoboxes. However, this may be undesired past a certain point, such as when starting a new section of the article. The clear template forces a break, and all text following it to be put after all templates before the clear. Usage:

{{clear}}