Template:MaterialReactions
Jump to navigation
Jump to search
This set of templates provides the building blocks to generate a neat table of material reactions. Do not transclude this template directly except on the /Reactions subpage of a material tag category page.
- Use
{{MaterialReactions/start}}
to generate the header. - Use
{{MaterialReactions/row}}
to add rows individually. - Use
{{MaterialReactions/tag}}
to add rows based on the material tags. This requires that the category page and its subpage have been setup correctly, see below. - Use
{{MaterialReactions/end}}
to end the table. - Use
{{MaterialReactions}}
only onCategory:Materials tagged with TAGNAME/Reactions
subpages.
Usage
{{MaterialReactions/start}}
{{MaterialReactions/row | rate = 50 | reagents = Copper + Flummoxium | products = Levitatium + Levitatium}}
{{MaterialReactions/end}}
Example
Reaction Rate | Reagents | Products |
---|---|---|
50 | Copper + Flummoxium | Levitatium + Levitatium |
Setting up a Category Page
Category pages of the form Materials tagged with X
can be setup to work with this template as follows:
- Move their Reactions table to a /Reactions subpage
- Use
{{MaterialReactions/row}}
in the subpage to define the table rows, omitting the header and footer- When adding rows, use the
{{{1}}}
parameter to let transcluding material pages substitute their material name for the tag name. For example, the [alchemy] tag page uses:{{MaterialReactions/row| rate = 100| reagents = Corrupted Rock + {{{1|[alchemy]}}}| products = Corrupted Rock + Corrupted Rock}}
- When adding rows, use the
- Transclude them in the Category page as shown above, using the `/start`, `/tag`, and `/end` sub-templates.
- (optional) tidy up the subpage by defining includeonly/noinclude sections, with the noinclude section transcluding this page directly. See Category:Materials tagged with alchemy/Reactions for an example.