Template:VendorTableHeader

From Space Station 13 Wiki
Jump to navigation Jump to search

This template is used to document the contents of vending machines. It automatically creates a wikitable-style table header that contains columns labeled "Icon", "Quantity", "Item", "Price" (if toggled on), and "Hidden Item?", with every column except Icon being sortable. This table is collapsible but starts open by default, and when collapsed, it shows "List of Contents" with a [Expand] link.

This is meant to be used alongside Template:VendorTableRow. That template creates row for each item inside a vendor and shows the vendor's actual contents, while this template provides the header for sorting. This allows people to sort by price, name, and more, something that is not possible with a bulleted list.

Usage

With Price Column

{{VendorTableHeader|Add Price Column?=Yes}}

(insert VendorTableRow templates here)

|}

Without Price Column

{{VendorTableHeader}}

(insert VendorTableRow templates here)

|}

Parameters

This template has only one parameter: Add Price Column? It's pretty self-explanatory. If the vendor makes you pay to get items, then the table showing its contents needs to have a column for prices. That means you should put Yes (it's case-sensitive, so yes won't do) for this template's parameter. If the vending machine doesn't require money, you can just omit this entirely.

Be forewarned: this template does not add the table end markup (|}). If you aren't copying and pasting the samples above, you need to add it after the template!