Template:PriceRow

From Eternal Lands Wiki

Jump to: navigation, 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 can contain a maximum of 15 cells. The first cell contains a picture of the item followed by the name of the item linked to the item's page. The cells following it are formatted for numerical prices associated with the headings of the columns.

{{PriceRow|name of item(required)|price(optional)|price(optional)|price(optional)|...}}

It will most likely be used in the form:

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

Example

{| class="wikitable sortable" cellpadding="3" cellspacing="0"
|-
!scope="col" | Item
!scope="col" | "Buy item" for
!scope="col" | "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, capitalization, and spacing 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 price 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. For example, 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.

In the game, if the item is not listed in the "Buy item" or "Sell item" 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.

This template may append up to 14 price cells to the name cell. A 2-column row containing only the item cell and the "Buy" price, for example, can be created by calling this template with only one price parameter. Each new price cell is appended to the row by typing "|" (pipe or vertical bar) followed by the cell's contents (which can be empty). To not display a cell, remove the pipe symbol associated with that cell from the call to the template.

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:

Personal tools