Difference between revisions of "Template:Multiinfobox"

From Discworld MUD Wiki
Jump to: navigation, search
(try to add space to click below links)
(typo)
Line 1: Line 1:
 
<includeonly>{|class="multiinfobox" style="border:0px;float:right" cellspacing=0
 
<includeonly>{|class="multiinfobox" style="border:0px;float:right" cellspacing=0
 
  |-
 
  |-
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} {{{name1}}} <br/> ?nbsp;
+
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} {{{name1}}} <br/> &nbsp;
{{#ifexpr:{{{num-boxes}}} > 1| {{!}} {{{name2}}} <br/> ?nbsp;
+
{{#ifexpr:{{{num-boxes}}} > 1| {{!}} {{{name2}}} <br/> &nbsp;
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} {{{name3}}} <br/> ?nbsp;
+
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} {{{name3}}} <br/> &nbsp;
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}} <br/> ?nbsp;
+
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}} <br/> &nbsp;
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} {{{name5}}} <br/> ?nbsp;
+
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} {{{name5}}} <br/> &nbsp;
 
{{#ifexpr:{{{num-boxes}}} > 5| {{!}} {{{name6}}}|}}|}}|}}|}}|}}|}}
 
{{#ifexpr:{{{num-boxes}}} > 5| {{!}} {{{name6}}}|}}|}}|}}|}}|}}|}}
 
  |-
 
  |-

Revision as of 18:05, 30 May 2011

[edit]

Documentation
 

This 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
}}
}}