Wiki Templates: Difference between revisions
imported>Tlosk m (→Parameters) |
imported>Tlosk |
||
Line 49: | Line 49: | ||
=== Named Variables === | === 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 a 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: | |||
<pre> | |||
{{Business Card | |||
| Name = Martine Strathelar | |||
| Address = 100 Planar Drive, Dereth | |||
| Business = Temporal Translocations | |||
| Phone Number = 555-555-1212 | |||
}} | |||
</pre> | |||
which using the hypothetical Business Card template might be displayed as: | |||
<blockquote class="toccolours" style="float:none; padding: 10px 15px 10px 15px; display:table;"><br><big><center>'''''Martine Strathelar'''''</center></big><br><center>'''Temporal Translocations'''</center><br>100 Planar Drive, Dereth - (555)555-1212</blockquote> | |||
[[Category:Help]] | [[Category:Help]] |
Revision as of 00:36, 6 January 2009
Related topics: Page Templates, Wiki Markup Reference
List of wiki templates that are used in formatting areas/items that recur frequently across different pages. Some templates are simple and do not require any parameters while others do. A more complete description is given below.
List of Templates
More information for each template can be found by clicking on the template name.
- {{Creature Class}} - Icon image and link to a creature class.
Table of Contents
- {{LeftToC}} - Table of contents appears on left side with text wrapping along the right.
- {{RightToC}} - Table of contents appears on right side with text wrapping along the left.
- {{Quest Links}} - Placed in quest summary header provides ToC like links to the major sections of a quest writeup.
- {{Exemplar ToC}} - Floats an exemplar image and Table of Contents on the right (text will wrap on the left).
- {{Related}} - List of related topics, replaces "See also" links. For one to twenty links.
- {{Patch Navigation Links}} - Group of links that navigates to next, previous, and all patches.
- {{Announcements Navigation Links}} - Group of links that navigate to next, previous, and all announcements.
- {{Patch Announcements Links}} - Formats links to current, original, and archived pages.
Quotations
- {{Turbine Developer}} - Quote block for a Turbine Developer comment.
Archive of Internet Article
- {{Turbine 2008}} - Archived internet articles from Turbine's website following the redesign in August 2008.
- {{Turbine 2005}} - Archived internet articles from Turbine's website between the redesigns in July 2005 and August 2008.
- {{Turbine 2003}} - Archived internet articles from Turbine's new website in 2003 and the redesign in July 2005.
- {{Microsoft Games}} - Archived internet articles from Microsoft Games.
- {{Microsoft Zone}} - Archived internet articles from the Microsoft Zone.
- {{Zogblaster}} - Archived internet articles from Turbine's prerelease website at zogblaster.com.
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 ( | ). 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
- Buy milk.
- Return videos.
- 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 a 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