Difference between revisions of "Template:VendorTableHeader/Documentation"

From Space Station 13 Wiki
Jump to navigation Jump to search
(Add Parameters section, correct Show Prices?->Add Price Column?)
(→‎Usage: hold on these should say VendorTableHeader not VendorTableRow)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
This template is used to document the contents of vending machines. It automatically creates a wikitable-style table header that contains the columns 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 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.
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.
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!