Wiki Templates: Difference between revisions

From Drunkapedia
Jump to: navigation, search
imported>Tlosk
No edit summary
imported>Arkalor
(moved Wiki Templates to Help:Wiki Templates: Moving to the Help namespace)
 
(102 intermediate revisions by 8 users 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.''
* [[Template:Creature Class|<nowiki>{{Creature Class}}</nowiki>]] - Icon image and link to a creature class.
 
=== 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.
 
== 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:
 
<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>
 
[[Category:Help]]

Latest revision as of 19:27, 8 April 2014