Template:Table/Food

From Ring of Brodgar
Jump to navigation Jump to search
Template documentation (for the template shown above, sometimes hidden or invisible)
Self calling #ask table generator.
  • Specific for food related categories.


Template Switch Parts.
  • [0] (none/#default): Used/called by the #ask part itself. Takes care of processing/formatting the table rows. (called for each row separately)
  • [1] "switch=ask": The #ask part itself.
    • "(anonymous)": Name of (food related) target category. (mandatory at the moment)
  • [2] "switch=fields": Main-table initiation and setting column headers.
    • "mheader=": Optional first column header text. (default: "Ïtem")
  • [3] "switch=header": Optional container table with adjustable class settings.
    • "(anonymous)": Container table header text. This text is the collapsed header text.
      • ToDo: Header text also used for unconditional case-count. (re-evaluate that part)
    • "class=": Table class specification. (Default: "mw-collapsible mw-collapsed")
    • "width=": Minimum distance where the "[Expand]" option is placed.
    • "minwidth=": Minimum distance where the "[Expand]" option is placed.
      • Both need to be used. Maximum value is used. (other can be 0, but not empty)
      • ToDo: re-check why both inputs are here. (seems they can be merged)
  • [4] "switch=close_table": For closing the main table. Or,
  • [4] "switch=close_header": for closing the header table.
  • [5] "CalculationInfo=": For setting, and adding additional field-data information. (Left over from other case. Not set/used here)


Example preview.
Ants (6
Ants

(6)
STR +1 STR +2 AGI +1 AGI +2 INT +1 INT +2 CON +1 CON +2 PER +1 PER +2 CHA +1 CHA +2 DEX +1 DEX +2 WIL +1 WIL +2 PSY +1 PSY +2 Energy Hunger Energy
per
Hunger
Total FEP
+1 / +2
Hunger
per FEP
Ant Empress 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 4 0 1,000 1 1,000 9 / 0 0.11 / 9
Ant Larvae 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 75 0.5 150 1 / 0 0.5 / 2
Ant Pupae 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 75 0.5 150 1 / 0 0.5 / 2
Ant Queen 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 300 1 300 4 / 0 0.25 / 4
Ant Soldiers 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 100 0.5 200 1 / 0 0.5 / 2
Aphids 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 100 0.5 200 2 / 0 0.25 / 4

Visit Template:Table/Food/doc to edit this text! (How does this work?)