Editing Template:Switch infobox/doc

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{documentation}}
{{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]].
'''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).


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.
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 34: Line 34:
* <code>switch_id</code> must '''not''' contain double-quotes (")
* <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.
* 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:
Example usage:
Line 70: Line 72:
==See also==
==See also==
* [[Template:Multi infobox]]
* [[Template:Multi infobox]]
* [[Module:Infobox#Special params]]
* [[Template:Infobox Bonuses#Displaying multiple infoboxes]]


{{TemplateData|<templatedata>
{{TemplateData|<templatedata>
Please note that all contributions to Brighter Shores Wiki are considered to be released under the CC BY-NC-SA 3.0 (see Brighter Shores:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!
Cancel Editing help (opens in new window)
Preview page with this template

This page is a member of a hidden category: