|
|
(71 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| {{RightToC}}
| | #REDIRECT [[Help:Wiki Templates]] |
| {{Related|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). 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 [[Wiki Templates#Parameters|complete description]] is given below.
| |
| | |
| == List of Templates ==
| |
| ''More information for each template can be found by clicking on the template name.''
| |
| | |
| === Maps ===
| |
| * [[Template:Spawn Map|<nowiki>{{Spawn Map}}</nowiki>]] - Formats preexisting map of spawn locations. See [[Spawn Map]] for additional information.
| |
| * [[Template:Map Point|<nowiki>{{Map Point}}</nowiki>]] - Displays a location on a small map of Dereth given specific coordinates, up to 4 points can be displayed on the same map.
| |
| * [[Template:Map Point Plus|<nowiki>{{Map Point Plus}}</nowiki>]] - Displays up to 30 locations on a large map of Dereth given specific coordinates. The markers on the map can be individually customized for each point, including a popup description.
| |
| | |
| === Table of Contents ===
| |
| * [[Template:LeftToC|<nowiki>{{LeftToC}}</nowiki>]] - Table of contents appears on left side with text wrapping along the right.
| |
| * [[Template:RightToC|<nowiki>{{RightToC}}</nowiki>]] - Table of contents appears on right side with text wrapping along the left.
| |
| * [[Template:Quest Links|<nowiki>{{Quest Links}}</nowiki>]] - Placed in quest summary header provides ToC like links to the major sections of a quest writeup.
| |
| * [[Template:Exemplar ToC|<nowiki>{{Exemplar ToC}}</nowiki>]] - Floats an exemplar image and Table of Contents on the right (text will wrap on the left).
| |
| | |
| === Navigation ===
| |
| * [[Template:Related|<nowiki>{{Related}}</nowiki>]] - List of related topics, replaces "See also" links. For one to twenty links.
| |
| * [[Template:Patch Navigation Links|<nowiki>{{Patch Navigation Links}}</nowiki>]] - Group of links that navigates to next, previous, and all patches.
| |
| * [[Template:Announcements Navigation Links|<nowiki>{{Announcements Navigation Links}}</nowiki>]] - Group of links that navigate to next, previous, and all announcements.
| |
| * [[Template:Patch Announcements Links|<nowiki>{{Patch Announcements Links}}</nowiki>]] - Formats links to current, original, and archived pages.
| |
| | |
| === Quotations ===
| |
| * [[Template:Turbine Developer|<nowiki>{{Turbine Developer}}</nowiki>]] - Quote block for a Turbine Developer comment.
| |
| | |
| === Archive of Internet Article ===
| |
| * [[Template:Turbine 2008|<nowiki>{{Turbine 2008}}</nowiki>]] - Archived internet articles from Turbine's website following the redesign in August 2008.
| |
| * [[Template:Turbine 2005|<nowiki>{{Turbine 2005}}</nowiki>]] - Archived internet articles from Turbine's website between the redesigns in July 2005 and August 2008.
| |
| * [[Template:Turbine 2003|<nowiki>{{Turbine 2003}}</nowiki>]] - Archived internet articles from Turbine's new website in 2003 and the redesign in July 2005.
| |
| * [[Template:Microsoft Games|<nowiki>{{Microsoft Games}}</nowiki>]] - Archived internet articles from Microsoft Games.
| |
| * [[Template:Microsoft Zone|<nowiki>{{Microsoft Zone}}</nowiki>]] - Archived internet articles from the Microsoft Zone.
| |
| * [[Template:Zogblaster|<nowiki>{{Zogblaster}}</nowiki>]] - Archived internet articles from Turbine's prerelease website at zogblaster.com.
| |
| | |
| === Miscellaneous ===
| |
| * [[Template:Sandbox|<nowiki>{{Sandbox}}</nowiki>]] - Practice and testing area for new templates.
| |
| * [[Template:Post|<nowiki>{{Post}}</nowiki>]] - Formatting for an individual post with indenting, can be used on talk pages or the [[Forum]].
| |
| * [[Template:Creature Class|<nowiki>{{Creature Class}}</nowiki>]] - Icon image and link to a creature class.
| |
| * [[Template:Creature|<nowiki>{{Creature}}</nowiki>]] - Table for individual creature stats. This is a component template and requires additional material for a complete page ([[Individual Creature Template]]).
| |
| * [[Template:Icon|<nowiki>{{Icon}}</nowiki>]] - Displays Icon, enforces [[Naming Conventions]] and sets the Icon popup caption to the item name rather than the full image file name.
| |
| * [[Template:Locations|<nowiki>{{Locations}}</nowiki>]] - Creates a whatlinkshere link for creatures and items, for use in the Notes section.
| |
| * [[Template:!|<nowiki>{{!}}</nowiki>]] - Alias for a pipe ( | ) when used within a parameter list for a wiki template.
| |
| * [[Template:Item Table|<nowiki>{{Item Table}}</nowiki>]] - Displays a bulleted list of items in a borderless table four across with their icons.
| |
| * [[Template:Intro|<nowiki>{{Intro}}</nowiki>]] - List of patch introduced, related quests, and patches updated.
| |
| * [[Template:Quest Summary|<nowiki>{{Quest Summary}}</nowiki>]] - Summary table and live shot as part of the [[Quest Guide Template]].
| |
| * [[Template:Key|<nowiki>{{Key}}</nowiki>]] - Stats panel and live image as part of the [[Key Template]].
| |
| * [[Template:Melee Weapon|<nowiki>{{Melee Weapon}}</nowiki>]] - Stats panel and live image as part of the [[Melee Weapon Stat Template]].
| |
| * [[Template:Missile Weapon|<nowiki>{{Missile Weapon}}</nowiki>]] - Stats panel and live image as part of the [[Missile Weapon Stat Template]].
| |
| * [[Template:Magic Caster|<nowiki>{{Magic Caster}}</nowiki>]] - Stats panel and live image as part of the [[Magic Caster Stat Template]].
| |
| * [[Template:Quest Experience Table|<nowiki>{{Quest Experience Table}}</nowiki>]] - Summary table for the [[Quest Guide Template]].
| |
| * [[Template:Title Rewards Table|<nowiki>{{Title Rewards Table}}</nowiki>]] - Title rewards table as part of the [[Quest Guide Template]].
| |
| | |
| == 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 [[Template:!|<nowiki>{{!}}</nowiki>]]. Here's an example of formatting a to do list with three items using the fictional ToDoList template:
| |
| | |
| <pre>
| |
| {{ToDoList|Buy milk.|Return videos.|Wash car.}}
| |
| </pre>
| |
| | |
| How the list is formatted will depend on exactly how the actual template is setup, but here is one possibility:
| |
| | |
| <div style="background-color:#E0E0E0; border:2px solid #C0C0C0;width:50%;padding:30px;margin-bottom:20px;margin-left:10%;margin-right:40%;">
| |
| <font color=#000000><big>'''To Do List'''</big>
| |
| ----
| |
| # Buy milk.
| |
| # Return videos.
| |
| # Wash car.
| |
| </font></div>
| |
| | |
| === 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:
| |
| | |
| <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>
| |
| | |
| == 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 [http://meta.wikimedia.org/wiki/Help:Template Help:Template] and [http://meta.wikimedia.org/wiki/Help:Advanced_templates 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 <nowiki>{{Sandbox}}</nowiki> 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 ===
| |
| * '''<nowiki><includeonly></includeonly></nowiki>''' - Optional tags you can place around the workhorse code that defines what the template does. It will cause the code to not display on the template page, improving the appearance of the page since most variables will be undefined. Also it will not compete with an example in situations where only one of an item can be displayed, such as a table of contents.
| |
| * '''<nowiki><noinclude></noinclude></nowiki>''' - Anything between these tags will be processed and displayed only when the page is being viewed directly; it will not be included or substituted in normal usage when the template is being referenced.
| |
| * '''<nowiki>{{{1}}}</nowiki>''' - The first unnamed variable (parameter) from the template invocation. That is, on another page where <nowiki>{{Related|Weapons|Armor|Loot}}</nowiki> is used, Weapons would be the first unnamed variable. Increment the number for successive variables, for example <nowiki>{{{3}}}</nowiki> would reference the third unnamed variable (Loot). Where this term (<nowiki>{{{1}}}</nowiki>) is used in your template, the variable's value will be inserted. So if <nowiki>[[{{{1}}}]]</nowiki> is in your template, it will be show up as [[Loot]] on the page where you used the template.
| |
| * '''<nowiki>{{{1|}}}</nowiki>''' - You can declare a default value for any variable by inserting a pipe and a default value. If the variable is undefined the default value will be given instead. For example, if the template uses <nowiki>{{{1|''No Link''}}}</nowiki> then if no value was passed, it will be assigned "No Link." This can be useful for templates where you will usually use a standard value but want to retain the option of specifying a value. When using the default, just leave out the variable. For example, <nowiki>{{{align|center}}}</nowiki>. This would still let you set align=right or align=left when using the template, but if you don't use align at all, it will be center.
| |
| * '''<nowiki>{{{Variable}}}</nowiki>''' - A named variable has an explicit name assigned with the equals sign when using the template. For example, on the page using the template you could have <nowiki>{{Business Card|Name=John Doe}}</nowiki>. This would mean that for the template "Business Card" the named variable "Name" has a value of "John Doe" and when using this on the actual template page you would use <nowiki>{{{Name}}}</nowiki> to reference this variable's value (John Doe).
| |
| * '''<nowiki>{{{Variable|}}}</nowiki>''' - As described above for <nowiki>{{{1|}}}</nowiki> you can also set a default value for named variables.
| |
| * '''<nowiki></nowiki>''' -
| |
| | |
| === Parser and Variable Functions ===
| |
| * '''<nowiki>#if</nowiki>:''' - <nowiki>{{#if: test string | value if true | value if false}}</nowiki>
| |
| * '''<nowiki>#ifeq:</nowiki>''' - <nowiki>{{#ifeq: string 1 | string 2 | value if true | value if false}}</nowiki> - Compares string 1 with string 2 to see if they are equal.
| |
| * '''<nowiki>#expr:</nowiki>''' - <nowiki>{{#expr: expression }}</nowiki> - [http://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23expr: Details]
| |
| * '''<nowiki>#vardefine</nowiki>''' - <nowiki>{{#vardefine: variablename | value }}</nowiki> - assigns variable
| |
| * '''<nowiki>#vardefineecho</nowiki>''' - <nowiki>{{#vardefineecho: variablename | value }}</nowiki> - assigns and prints variable
| |
| * '''<nowiki>#var</nowiki>''' - <nowiki>{{#var: variablename }}</nowiki> - prints current value
| |
| | |
| == Request a Template ==
| |
| If you would like a template made but aren't sure how to go about adding one, [[User:Tlosk|Tlosk]] or [[User:Widgeon|Widgeon]] can probably help you.
| |
| | |
| [[Category:Help]]
| |