Template:Shop/doc: Difference between revisions

From Dragon Quest Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 30: Line 30:
==Example==
==Example==
===Sample===
===Sample===
<div style="clear:both;">
{{Shop|header}}
{{Shop|header}}
{{Shop|subtable|game=[[Dragon Quest IV]]|console=DS}}
{{Shop|subtable|game=[[Dragon Quest IV]]|console=DS}}
Line 43: Line 42:
{{Shop|subtablefooter}}
{{Shop|subtablefooter}}
{{Shop|footer}}
{{Shop|footer}}
</div>
===Code===
===Code===
<pre>
<pre>

Revision as of 16:26, 18 February 2010

The Shop template is used to display shop information for various locations in Dragon Quest games. This template covers all types of shops (items, tools, weapons, armor).

Usage

In almost all cases, using this template should be preceded by a heading describing the shop type on the article it is being transcluded onto (i.e.==Item Shop==). This is because there is no label marking the table a specific type of shop within this template. This is consistent with other location templates.

Header

A header call to this template should be the first usage of this template on any page.

{{Shop|header|float=right}}
  • header: A required parameter which marks this as the start of a shop table.
  • float: The float parameter is optional. It represents the CSS float style and should be 'left', 'right', or 'center'. The default is left.

Subtable

A subtable call is made to designate shop data for a specific game and console. Note that for shops which sell the same items across different versions of a game should be merged into one subtable (i.e. console=NES,GBC).

{{Shop|subtable|game=[[Dragon Quest II]]|console=NES}}
  • subtable: A required parameter marking the start of a subtable.
  • game: The game this shop represents. Should be an interwiki link.
  • console: The console version of the game. Note: This parameter should contain multiple console values separated by commas if the game and price parameters are the same!

Entries

Each entry in the shop table is represented by a single template call.

{{Shop|entry|item=[[Broad Sword]]|price=4g per person}}
  • entry: A required parameter which marks this as a single shop table entry.
  • item: The name of the item. Should be an interwiki link.
  • price: The price of the item. Should include units of currency.

Subtable Footer

This call is mainly for formatting purposes separates sets of shop data.

{{Shop|subtablefooter}}
  • subtablefooter: A required parameter marking the end of a subtable.

Footer

The footer call marks the end of the shop table.

{{Shop|footer}}
  • footer: A required parameter marking the template as the footer.

Example

Sample

{{{title}}}
Item Price Attributes
Broad Sword 1500g {{{attributes}}}
Cloak of Evasion 2800g {{{attributes}}}
Iron Helmet 2200g {{{attributes}}}
Judgement Staff 1300g {{{attributes}}}
Cautery Sword ? {{{attributes}}}
Flame Sword 8600g {{{attributes}}}

Code

{{Shop|header}}
{{Shop|subtable|game=[[Dragon Quest IV]]|console=DS}}
{{Shop|entry|item=[[Broad Sword]]|price=1500g}}
{{Shop|entry|item=[[Cloak of Evasion]]|price=2800g}}
{{Shop|entry|item=[[Iron Helmet]]|price=2200g}}
{{Shop|entry|item=[[Judgement Staff]]|price=1300g}}
{{Shop|subtablefooter}}
{{Shop|subtable|game=[[Dragon Quest V]]|console=DS}}
{{Shop|entry|item=[[Cautery Sword]]|price=?}}
{{Shop|entry|item=[[Flame Sword]]|price=8600g}}
{{Shop|subtablefooter}}
{{Shop|footer}}