Difference between revisions of "Template:VendorTableHeader"
Studenterhue (talk | contribs) m (Studenterhue moved page User:Studenterhue/Template:VendorTableHeader to Template:VendorTableHeader without leaving a redirect: Feel ready to move this to Mainspace now) |
Studenterhue (talk | contribs) (Update transclusion to reflect the fact that it's no longer in userspce) |
||
Line 6: | Line 6: | ||
! scope="col" | Item | ! scope="col" | Item | ||
{{#switch: {{{Add Price Column?}}} | Yes= ! scope="col" {{!}} Price}} | {{#switch: {{{Add Price Column?}}} | Yes= ! scope="col" {{!}} Price}} | ||
! scope="col"| [[Hacking#Vending Machines and Fabricators|Hidden<br>item?]]</includeonly><noinclude>{{ | ! scope="col"| [[Hacking#Vending Machines and Fabricators|Hidden<br>item?]]</includeonly><noinclude>{{Template:VendorTableHeader/Documentation}}</noinclude> |
Revision as of 06:20, 22 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!