Template:StoreTableHead

Template documentation
This documentation is transcluded from Template:StoreTableHead/doc. [edit] [history] [purge]
Template:StoreTableHead invokes function main in Module:StoreTableHead using Lua.

The StoreTableHead template is to be used in conjunction with {{StoreLine}} to provide a listing of items that are found in a shop. It also helps to provide a uniform look of how the shop information is presented for all articles about shop on the wiki.

Usage

The following templates are used to form the store's stock table:

  • {{StoreTableHead}} - Contains table headers for the top of the store stock table
  • {{StoreLine}} - Template for each line item in the store
  • {{StoreTableEnd}} - Contains end of the table and the reference list for the store stock table

For example:

{{StoreTableHead}}
{{StoreLine|name=Empty pot|stock=30|sell=1|buy=0}}
{{StoreLine|name=Jug|stock=10|sell=1|buy=0}}
{{StoreLine|name=Shears|stock=10|sell=1|buy=0}}
{{StoreLine|name=Tinderbox|stock=10|sell=1|buy=0}}
{{StoreTableEnd}}

gives

Parameters (optional)

  • namenotes: additional text information for autogenerated store lists (e.g. Karamja gloves).
  • currency: an optional currency for the entire table (replaces Coins as the default currency), can be overridden by the individual lines of the table.
  • arc: an optional boolean to specify a store in The Arc. Replaces the GE/Resale columns with the upgraded buy prices.
  • gemw: optionally set gemw for the entire table, can be overridden by the individual lines of the table.
  • bucket: set to "No" to prevent indexing of this table into {{Shop locations list}}. Use this to prevent duplicates (e.g. the store is shown on the store page AND the npc page). Can be overridden by the individual lines of the table.
  • descriptions: adds the description column.
  • lighttable: makes the rows selectable, adding a highlight when selected.
  • sticky-header: makes the header row sticky (stays at the top of the table even when you scroll down).
  • historical: marks the shop as discontinued when displayed with Template:Shop locations list.
  • hideimage set to "yes" to hide the image column, for example for stores that sell things that don't necessarily have a fitting icon (e.g. abstract unlocks or abilities).
  • hidege set to "yes" to hide the GE column (if none of the items are tradeable on GE) - you still need to set gemw=yes for the StoreLine template.
  • hidebuy set to "yes" to hide the Buy price column (if none of the items are tradeable on GE) - you still need to set Buy=N/A for the StoreLine template.
  • hidestock set to "yes" to hide the Stock column (useful for minigame and dialogue shops where everything has infinite stock).
  • hideresale set to "yes" to hide the Resale column.
  • hidemembers hidden by default, if set to "no" shows members column (value based on members attribute from {{StoreLine}})
  • column1: Add an additional column with this as contents.
  • column2: Add an additional column with this as contents.
  • columnX: ... Add an additional column with this as contents.
  • upgradestore: Set to yes to remove the currency sum at the bottom of the table. For upgrade shops like the Livid Farm spells.
  • location: Override to the location of the shop. Defaults to the location of the infobox on the page.

Currency example

By using the currency parameter, prices will be shown as below.

{{StoreTableHead|currency=Tokkul}}
{{StoreLine|name=Empty pot|stock=30|sell=1|buy=0}}
{{StoreLine|name=Jug|stock=10|sell=1|buy=0}}
{{StoreLine|name=Shears|stock=10|sell=1|buy=0}}
{{StoreLine|name=Tinderbox|stock=10|sell=1|buy=0}}
{{StoreTableEnd}}

gives

Arc example

By using the arc parameter, items will be displayed as below with the upgraded buy prices.

{{StoreTableHead|arc=yes|gemw=no}}
{{StoreLine|name=Driftwood|stock=0|sell=10|buy=1}}
{{StoreLine|name=Bamboo|stock=0|sell=10|buy=1}}
{{StoreLine|name=Golden bamboo|stock=0|sell=30|buy=3}}
{{StoreLine|name=Bundle of bamboo|stock=0|sell=100|buy=10}}
{{StoreTableEnd}}

gives

Descriptions example

By using the descriptions parameter, a description column will be added.

{{StoreTableHead|descriptions=yes}}
{{StoreLine|name=Empty pot|stock=30|sell=1|buy=0|description=I'm an empty pot.}}
{{StoreLine|name=Jug|stock=10|sell=1|buy=0|description=I'm a jug.}}
{{StoreLine|name=Shears|stock=10|sell=1|buy=0|description=I'm a pair of shears.}}
{{StoreLine|name=Tinderbox|stock=10|sell=1|buy=0|description=I'm a box.}}
{{StoreTableEnd}}

gives

Lighttable example

By using the lighttable parameter, rows will be selectable as shown below.

{{StoreTableHead|lighttable=yes}}
{{StoreLine|name=Empty pot|stock=30|sell=1|buy=0}}
{{StoreLine|name=Jug|stock=10|sell=1|buy=0}}
{{StoreLine|name=Shears|stock=10|sell=1|buy=0}}
{{StoreLine|name=Tinderbox|stock=10|sell=1|buy=0}}
{{StoreTableEnd}}

gives

Members example

By using the hidemembers=no, members column will be shown.

{{StoreTableHead|hidemembers=no}}
{{StoreLine|name=Jug of vinegar|stock=10|sell=1|buy=N/A|members=yes}}
{{StoreLine|name=Jug of wine|stock=10|sell=128|buy=38|members=no}}
{{StoreLine|name=Bottle of wine|stock=10|sell=500|buy=150|gemw=no|members=no}}
{{StoreLine|name=Dragonstone|stock=1|sell=10000|buy=3000|members=yes}}
{{StoreTableEnd}}

gives

See also

Template data

Show/hide template's data

The following information is used by extensions and applications, such as VisualEditor, to help users implement this template onto pages. Please ensure that it is up-to-date.

Template for generating the header for tables of items sold by shops.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Store Currencycurrency

Set a default currency for all the items in the store. Can be overriden per line.

Default
Coins
Example
Trading sticks
Stringoptional
Historicalhistorical

Mark the shop as historical or discontinued.

Default
false
Example
true
Stringoptional
Arc Storearc

Specify whether a store is in the arc. Replaces the GE/Resale values with the upgraded buy prices.

Default
false
Example
true
Stringoptional
Descriptionsdescriptions

Adds a description column on the table.

Default
no
Example
yes
Stringoptional
Lighttablelighttable

Create the table as a lighttable (the rows are selectable).

Default
no
Example
yes
Stringoptional
Sticky Headersticky-header

Create the table with a sticky header (stays at the top of the table as you scroll down)

Default
no
Example
yes
Stringoptional