Template:BuildingsTabber
The BuildingsTabber uses Javascript from Gadget-BuildingsTabber.js and is styled by Gadget-BuildingsTabber.css .
Template:BuildingsTabber
This Template is used as a Footer for any Buildings and is called without any Parameters.
Template:BuildingsTabber/Section
BuildingsTabber/Section is a cargo query from the Buildings cargo table, as defined by Template:Infobox Building. It gets its strings from what was clicked.
var toParse = '{{BuildingsTabber/Section|category=' + curCategory + '}}';
- curCategory - the current Category is, for example "Refinement"
The Javascript will check if this category was already cached, and if not will parsed the subtemplate for example like {{NavboxSection |category=Refinement}}
, which it will then turn into a cargo query. Then it will cache the generated html to the browsers local cache.
Template:BuildingsTabber/CategoryItem
Will display a File according to it's parameter [[File:{{parameter}}_Menu.png]] with the parameter underneath. This parameter will also be used in the javascript to hand out the category for NavboxSection to hand out the category to find it's matches the category handed out in Template:Infobox Building.
If future DLCs adds more categories, like Spaced Out! did Radiation, the styling of lower and upper tabber needs to be changed in the .css (currently they are made to house 8 and 7 items respectively).