Template:PriceRow/doc

From ELWiki
< Template:PriceRow
Revision as of 01:12, 18 September 2010 by Vygder (talk | contribs) (created page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Usage

This is a template for inserting a row in tables of item prices on el-wiki. It should only be used inside a table that is declared with wikitext. It creates 1 (one) table row using wikitext which contains 3 (three) columns. The first column contains the picture of the item followed by the name of the item linked to the item's page. The second column contains an optional price to be displayed in the "Buy item" column. The third column contains an optional price to be displayed in the "Sell item" column.

This template is designed to be used inside the {{PriceTable}} template, but it can be used in any wikitext table.

{{PriceRow|name of item|optional "Buy item" price|optional "Sell item" price}}

Example

{| class="sortable" style="border:1px solid grey; border-collapse:collapse; background:#e0e4c5;" cellpadding="3" cellspacing="0"
|-
!scope="col" style="border:1px solid grey; background: #d1d7b1;" | Item
!scope="col" style="border:1px solid grey; background: #d1d7b1;" | "Buy item" for
!scope="col" style="border:1px solid grey; background: #d1d7b1;" | "Sell item" for
{{PriceRow|Santa Hat||21}}
{{PriceRow||32|48}} <!-- item name is missing on purpose for this example -->
{{PriceRow|White Robe|42|250}}
{{PriceRow|Sulfr|3|6}} <!-- item name is misspelled on purpose for this example -->
{{PriceRow|Brown Tunic Blue Shirt|10|}}
|}
Item "Buy item" for "Sell item" for
Santa Hat.png Santa Hat 21
White Robe.png White Robe 42 250
File:Sulfr.png Sulfr 3 6
Brown Tunic Blue Shirt.png Brown Tunic Blue Shirt 10
  • "Sulfr" is misspelled on purpose for this example.
  • One row is missing because the item name for that row was not written as a parameter in the template for that row (see the example code above).

Notes

The name of the item is required for the row to be displayed. The name of the item must match the spelling and capitalization of item's page name and picture name. This template expects the image to have a PNG extension (*.png). Most of the images on el-wiki are in PNG format anyway.

In the "buy" and "sell" parameters, only numerical values greater than 0 (zero) are allowed. If any non-numerical values are included in those columns, the table will sort those columns according to ASCII (alphabetic) values rather than numerically. Putting the words "gold coins" in each cell to indicate the units would cause improper sorting by ASCII. Instead, include a note clarifying the units elsewhere on the page. (The {{PriceTable}} template includes a note at the bottom of the table.)

In the game, if the item is not listed in the "Buy" or "Sell" text menus of the associated NPC, leave that parameter in this template blank or empty. Do not write "0" (zero) for the price as this would imply that the item can be traded for 0 gold coins, which is not possible.

The background color of the row has been set to be slightly darker than the current (as of September 2010) el-wiki page background color.

More info:

See also