Difference between revisions of "Template:Multiinfobox"

From Discworld MUD Wiki
Jump to: navigation, search
m (Revert)
(add parameter for float (or not))
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{|class="multiinfobox" style="border:0px;float:right" cellspacing=0
+
<includeonly>{|class="multiinfobox" style="border:0px;{{{float|float:right}}}" cellspacing=0
 
  |-
 
  |-
 
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} {{{name1}}}
 
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} {{{name1}}}
 
{{#ifexpr:{{{num-boxes}}} > 1| {{!}} {{{name2}}}
 
{{#ifexpr:{{{num-boxes}}} > 1| {{!}} {{{name2}}}
 
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} {{{name3}}}
 
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} {{{name3}}}
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}}|}}|}}|}}|}}
+
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} {{{name4}}}
 +
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} {{{name5}}}
 +
{{#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}}} > 10| {{!}} {{{name11}}}
 +
{{#ifexpr:{{{num-boxes}}} > 11| {{!}} {{{name12}}}
 +
{{#ifexpr:{{{num-boxes}}} > 12| {{!}} {{{name13}}}
 +
{{#ifexpr:{{{num-boxes}}} > 13| {{!}} {{{name14}}}
 +
{{#ifexpr:{{{num-boxes}}} > 14| {{!}} {{{name15}}}
 +
{{#ifexpr:{{{num-boxes}}} > 15| {{!}} {{{name16}}}
 +
{{#ifexpr:{{{num-boxes}}} > 16| {{!}} {{{name17}}}
 +
{{#ifexpr:{{{num-boxes}}} > 17| {{!}} {{{name18}}}
 +
{{#ifexpr:{{{num-boxes}}} > 18| {{!}} {{{name19}}}
 +
{{#ifexpr:{{{num-boxes}}} > 19| {{!}} {{{name20}}}
 +
{{#ifexpr:{{{num-boxes}}} > 20| {{!}} {{{name21}}}
 +
{{#ifexpr:{{{num-boxes}}} > 21| {{!}} {{{name22}}}
 +
{{#ifexpr:{{{num-boxes}}} > 22| {{!}} {{{name23}}}
 +
{{#ifexpr:{{{num-boxes}}} > 23| {{!}} {{{name24}}}
 +
{{#ifexpr:{{{num-boxes}}} > 24| {{!}} {{{name25}}}
 +
{{#ifexpr:{{{num-boxes}}} > 25| {{!}} {{{name26}}}
 +
{{#ifexpr:{{{num-boxes}}} > 26| {{!}} {{{name27}}}
 +
{{#ifexpr:{{{num-boxes}}} > 27| {{!}} {{{name28}}}
 +
{{#ifexpr:{{{num-boxes}}} > 28| {{!}} {{{name29}}}
 +
{{#ifexpr:{{{num-boxes}}} > 29| {{!}} {{{name30}}} |}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}
 
  |-
 
  |-
 
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box1}}}
 
{{#ifexpr:{{{num-boxes}}} > 0| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box1}}}
Line 12: Line 38:
 
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box3}}}
 
{{#ifexpr:{{{num-boxes}}} > 2| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box3}}}
 
  {{!}}-
 
  {{!}}-
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box4}}}|}}|}}|}}|}}
+
{{#ifexpr:{{{num-boxes}}} > 3| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box4}}}
  |-
+
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 4| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box5}}}
 +
{{!}}-
 +
{{#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}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 10| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box11}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 11| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box12}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 12| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box13}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 13| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box14}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 14| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box15}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 15| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box16}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 16| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box17}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 17| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box18}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 18| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box19}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 19| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box20}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 20| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box21}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 21| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box22}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 22| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box23}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 23| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box24}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 24| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box25}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 25| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box26}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 26| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box27}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 27| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box28}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 28| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box29}}}
 +
{{!}}-
 +
{{#ifexpr:{{{num-boxes}}} > 29| {{!}} colspan = {{{num-boxes}}} {{!}} {{{box30}}} |}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}|}}
 
  |}</includeonly><noinclude>{{documentation}}</noinclude>
 
  |}</includeonly><noinclude>{{documentation}}</noinclude>

Latest revision as of 23:18, 28 January 2019

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