Difference between revisions of "Template:Ingredient List"

From RimWorld Wiki
Jump to navigation Jump to search
Line 2: Line 2:
 
{{Documentation}}
 
{{Documentation}}
 
</noinclude>
 
</noinclude>
 
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
 
{{#vardefine:name | {{{ 1 | {{PAGENAME}}}}} }}
 
<noinclude>
 
<noinclude>
Line 10: Line 9:
 
! Name !! Amount
 
! Name !! Amount
 
|-
 
|-
{{#ask:[[Resource 1::{{lc:Steel}}]]
+
{{#ask:[[Resource 1::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
Line 16: Line 15:
 
  | format=template
 
  | format=template
 
  | template=Ingredient List Row
 
  | template=Ingredient List Row
}}{{#ask:[[Resource 2::{{lc:Steel}}]]
+
}}
 +
|-
 +
{{#ask:[[Resource 2::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
Line 22: Line 23:
 
  | format=template
 
  | format=template
 
  | template=Ingredient List Row
 
  | template=Ingredient List Row
}}{{#ask:[[Resource 3::{{lc:Steel}}]]
+
}}
 +
|-
 +
{{#ask:[[Resource 3::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
Line 28: Line 31:
 
  | format=template
 
  | format=template
 
  | template=Ingredient List Row
 
  | template=Ingredient List Row
}}{{#ask:[[Resource 4::{{lc:Steel}}]]
+
}}
 +
|-
 +
{{#ask:[[Resource 4::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
Line 34: Line 39:
 
  | format=template
 
  | format=template
 
  | template=Ingredient List Row
 
  | template=Ingredient List Row
}}{{#ask:[[Resource 5::{{lc:Steel}}]]
+
}}
 +
|-
 +
{{#ask:[[Resource 5::{{lc:{{#var:name}}}}]]
 
  | named args=yes
 
  | named args=yes
 
  | ?Name=?Name
 
  | ?Name=?Name
 
  | ?Resource 5 Amount=?Amount
 
  | ?Resource 5 Amount=?Amount
 
  | format=template
 
  | format=template
  | template=Ingredient List Row}}
+
  | template=Ingredient List Row
 +
}}
 +
|-
 
|}
 
|}

Revision as of 06:29, 7 January 2021

Documentation icon Template documentation[view] [edit] [history] [purge]

Description

This template automatically creates a table of all items that use given material in their creation recipes, as well as how much of the material is required.

This template is dependent on Template: Ingredient List Row.

Parameters

The first parameter (if present) will specify which material to generate the template for. If absent, {{PAGENAME}} will be used.

noCollapse=1 will suppress the collapsible nature of table.

Example usage

{{Ingredient List}}

on the Steel page would produce:


... further results
Name Amount
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
{{Ingredient List| Neutroamine}}

on any page would produce:


Name Amount
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
{{Ingredient List| Chemfuel|noCollapse=1}}

on any page would produce:


Name Amount
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]



... further results
Name Amount
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]
[[{{{?Product}}}]] (Error: Page does not exist) [[{{{?Product}}}|{{{?Product}}}]] [[{{{?Type}}}]] - [[{{{?Type2}}}]]