Wiki Templates

From Asheron's Call Community Wiki

Jump to: navigation, search

Contents

Related topics: Page Templates, Wiki Markup Reference

List of wiki templates that are used in formatting areas/items that recur frequently across different pages. Their purpose is two-fold, to make using advanced formatting simpler and to allow formatting changes in the future with a single edit (so you don't have to go back and reedit all the pages that use the template). Templates are not only convenient, but they can also "force" a useful uniformity. Some templates are simple and do not require any parameters but most do. If you're new to the term parameter or argument passing in general, a more complete description is given below.


Unlike the templates listed here, Page Templates are copies of the basic wiki markup code for an entire page and include large areas where unique information is inserted (for example the walkthough on a quest guide). The templates listed here are self-contained, small, and only the specified parameters can be used. Page templates usually contain one or more wiki templates within them, but it is rare for a wiki template to be sufficient to cover the content of an entire page. An analogy would be page templates are like the blue prints of a house, wiki templates are like the lumber and materials, and unique content is like the furniture and people. Also an important technical difference is content using a wiki template looks up the template each time the page is accessed and will reflect the most current version of the template. This is not true for page templates, the content pages do not change if the page template is changed and must be updated manually.


Note: Wikipedia and many other wikis use lower case or first letter upper case (e.g., "Wiki templates" or "wiki templates") in naming articles, templates, images, etc. However due to the specialized nature of ACC Wiki wherein it holds only content related to Asheron's Call, title case is the default for naming because that is what is used in game.

List of Templates

More information for each template can be found by clicking on the template name.

Maps

Table of Contents

Navigation

Quotations

Archive of Internet Article

See Archive of Internet Article Template for an examples.

Elements

Rudimentary components used within many other templates/types of pages.

Page Template Related

Templates that are designed for use on specific Page Templates.

Lore Templates

Templates used in various lore pages:

Functions

Technically these are not templates, but they are similar in appearance. These modify a string value or perform some operation. A few that are used often in templates are listed below, for a more complete list, see Wiki Markup Reference#Magic Words and Help:Magic words.

Image License

Parameters

A parameter, or argument, is information that the template needs to complete its job. If a parameter is required, you must include it, if it is optional you can omit it if it doesn't apply. For example if someone gives you a to do list, the purpose of the list is clear, you are supposed to do the items on the list. But for any given list, the items will differ. A template that requires parameters is the same idea. Parameters are separated with single pipes ( | ). If you need to include a pipe as part of a parameter use {{!}}. Here's an example of formatting a to do list with three items using the fictional ToDoList template:

{{ToDoList|Buy milk.|Return videos.|Wash car.}}

How the list is formatted will depend on exactly how the actual template is setup, but here is one possibility:

To Do List


  1. Buy milk.
  2. Return videos.
  3. Wash car.

Named Variables

Unlike the ToDo list above where all the parameters are things to do, most templates that use parameters give each one an explicit name. This is needed when the parameters are formatted differently or put in particular locations.

An example would be a business card template. The phone number, address, name, etc all go in particular locations and so the template needs to know which parameter is the name, which is the address, etc.

For example:

{{Business Card
| Name = Martine Strathelar
| Address = 100 Planar Drive, Dereth
| Business = Temporal Translocations
| Phone Number = 555-555-1212
}}

which using the hypothetical Business Card template might be displayed as:


Martine Strathelar

Temporal Translocations

100 Planar Drive, Dereth - (555)555-1212

Whitespace

Whitespace (including newlines, tabs and spaces) is stripped from the beginning and end of all parameters. If this is not desirable, adding any non-whitespace characters (including the HTML encoding for a whitespace character, or invisible Unicode characters such as the zero-width space or direction marks) will prevent further stripping:

{{#ifeq: foo            |            foo | equal | not equal }}
equal
{{#ifeq:  foo            |            foo  | equal | not equal }}
not equal

Judicious use of whitespace can make templates more readable, quicker to fill out, and easier to debug when unexpected behavior occurs. Compare the two uses below that would have identical results.

{{Template
 |   Parameter One = One
 |   Parameter Two = Two
 | Parameter Three = Three
 |  Parameter Four = Four
}}

{{Template|Parameter One=One|Parameter Two=Two|Parameter Three=Three|Parameter Four=Four}}

Strip/Trim

Some complicated templates can experience problems with how white space is used when invoking the template (where you would get different results using {{template | variable }} vs. {{template|variable}} even though technically they should be the same. Use the {{Strip}} function around the variable in the template for consistent results.

Advanced Template Syntax

To use templates you won't need to know any of the following, however in order to edit an existing template or to create a new template you may find this information useful. Additional info can be found at Help:Template and Help:Advanced templates (Wikipedia, so the information may not always apply exactly to this installation of Wikimedia software). You cannot preview changes to a template, so to avoid having broken templates for other users, test changes or new templates in the Template:Sandbox. (Don't forget to change your template's name to {{Sandbox}} to see the effects in the Sandbox.) Once it is working how you expect it to, transfer the code to the actual template page and revert the Sandbox.

Syntax

{{Template
 | align = top
 | margin = 
}}
One way around this that would handle both situations (completely absent and just a blank value) would be to use {{#ifeq:{{{align|}}}||<value if absent or blank>|<value if present and nonblank>}}. This comparison sets an empty string as the default, so if it is either not present or blank it will lead give the same result.

Parser and Variable Functions

Request a Template

If you would like a template made but aren't sure how to go about adding one, Tlosk or Widgeon can probably help you.

Personal tools
Namespaces
Variants
Actions
Navigation
Ads
Toolbox