Template:Switch infobox/doc: Difference between revisions

edit out the bits not relevant to BSwiki
(copy documentation over from RS3)
 
(edit out the bits not relevant to BSwiki)
Line 2:
{{documentation}}
 
'''Template:Switch infobox''' is used to display infoboxes of the same type on a single page, as opposed to [[Template:Multi infobox]], which displays infoboxes of different types on a single page. It is typically used to separate versions of the subject with different conditions (for example, an NPC's state/appearance before and after a quest). In the Brighter Shores wiki, this function is built into [[Module:Infobox]] as the <code>versions</code> options, so any infoboxes which are built from that base should use the native switch behaviour. This template should only be used for template boxes that are not built on the base of [[Module:Infobox]].
 
After the insertion of the template, there will be different buttons stating the possible conditions of that page. When clicked on different conditions, the page will display different information.
Line 35:
* <code>switch_id</code> must '''not''' contain double-quotes (")
* Do '''NOT''' use the same <code>switch_id</code> for multiple items in the same switch infobox. This causes both items to be shown when clicked and duplicates the switch buttons.
 
Note that if using switch_id's on a page containing a [[Template:Synced switch]], you will probably want to specify <code>nodefault=y</code> in the sync switch. See the documentation on [[Template:Synced switch#No default switching]] and [[Template:Synced switch#Switch IDs]] for more detail.
 
Example usage:
Line 73 ⟶ 71:
==See also==
* [[Template:Multi infobox]]
* [[TemplateModule:Infobox Bonuses#Displaying multipleSpecial infoboxesparams]]
 
{{TemplateData|<templatedata>
21,687

edits