Difference between revisions of "Template:VendorTableHeader/Documentation"

From Space Station 13 Wiki
Jump to navigation Jump to search
m (Studenterhue moved page User:Studenterhue/Template:VendorTableHeader/Documentation to Template:VendorTableHeader/Documentation without leaving a redirect: Feel ready to move this to Mainspace now)
(→‎Usage: hold on these should say VendorTableHeader not VendorTableRow)
 
Line 6: Line 6:
===With Price Column===
===With Price Column===
<pre>
<pre>
{{VendorTableRow|Add Price Column?=Yes}}
{{VendorTableHeader|Add Price Column?=Yes}}


(insert VendorTableRow templates here)
(insert VendorTableRow templates here)
Line 14: Line 14:
===Without Price Column===
===Without Price Column===
<pre>
<pre>
{{VendorTableRow}}
{{VendorTableHeader}}


(insert VendorTableRow templates here)
(insert VendorTableRow templates here)

Latest revision as of 07:43, 29 July 2023

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!