Difference between revisions of "Template:Multiinfobox"
From Discworld MUD Wiki
(undo spaces, will do on the other end) |
(handle up to 10) |
||
Line 6: | Line 6: | ||
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}} | {{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}} | ||
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} {{{name5}}} | {{#ifexpr:{{{num-boxes}}} > 4| {{!}} {{{name5}}} | ||
− | {{#ifexpr:{{{num-boxes}}} > 5| {{!}} {{{name6}}}|}}|}}|}}|}}|}}|}} | + | {{#ifexpr:{{{num-boxes}}} > 5| {{!}} {{{name6}}} |
+ | {{#ifexpr:{{{num-boxes}}} > 6| {{!}} {{{name7}}} | ||
+ | {{#ifexpr:{{{num-boxes}}} > 7| {{!}} {{{name8}}} | ||
+ | {{#ifexpr:{{{num-boxes}}} > 8| {{!}} {{{name9}}} | ||
+ | {{#ifexpr:{{{num-boxes}}} > 9| {{!}} {{{name10}}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}} | ||
|- | |- | ||
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box1}}} | {{#ifexpr:{{{num-boxes}}} > 0| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box1}}} | ||
Line 18: | Line 22: | ||
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box5}}} | {{#ifexpr:{{{num-boxes}}} > 4| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box5}}} | ||
{{!}}- | {{!}}- | ||
− | {{#ifexpr:{{{num-boxes}}} > 5| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box6}}}|}}|}}|}}|}}|}}|}} | + | {{#ifexpr:{{{num-boxes}}} > 5| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box6}}} |
+ | {{!}}- | ||
+ | {{#ifexpr:{{{num-boxes}}} > 6| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box7}}} | ||
+ | {{!}}- | ||
+ | {{#ifexpr:{{{num-boxes}}} > 7| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box8}}} | ||
+ | {{!}}- | ||
+ | {{#ifexpr:{{{num-boxes}}} > 8| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box9}}} | ||
+ | {{!}}- | ||
+ | {{#ifexpr:{{{num-boxes}}} > 9| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box10}}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}} | ||
|- | |- | ||
|}</includeonly><noinclude>{{documentation}}</noinclude> | |}</includeonly><noinclude>{{documentation}}</noinclude> |
Revision as of 12:51, 10 September 2011
[edit]
DocumentationThis template can be used to combine multiple infoboxes into a single, tabbed box. Clicking on a tab switches the view between the different infoboxes.
Parameters
- num-boxes - The number of infoboxes used. Up to 4 are currently supported.
- name1, name2, etc. - The name for the tab for each infobox.
- box1, box2, etc. - The infobox templates. For unknown reasons, you need to start each of these parameters with '<nowiki></nowiki>'
Sub pages
For weapons and other uses it is best to make sub pages with one infobox per page so that the data within can be individually included in tables. You put it like this:
{{multiinfobox |num-boxes=2 |name1=<small>[[{{PAGENAME}} (weapon)|modify]]</small> <br/> Weapon |name2=<small>[[{{PAGENAME}} (faith rod)|modify]]</small> <br/> Faith rod |box1=<nowiki></nowiki>{{:{{PAGENAME}} (weapon)}} |box2=<nowiki></nowiki>{{:{{PAGENAME}} (faith rod)}} }}
This is an example for weapon/faith rod, but you can adapt it to multiple weapons, etc.
For the sub pages check with the infobox page you're putting. For weapons see {{Weapon data}}.
No sub pages
To make a Multiinfobox within the same page, you can used this example:
{{Multiinfobox |num-boxes=2 |name1=Stat item |name2=Armour |box1=<nowiki></nowiki>{{Infobox Stat Item |con= |dex= |int= |str=+2 |wis= }} |box2=<nowiki></nowiki>{{Infobox armour |Vs sharp=poor |Vs blunt=average |Vs pierce=poor |Weight=3 lb |Covers=hands }} }}