Latest revision as of 16:05, 24 August 2024
Purpose
Template used to create tabs, allowing users to switch between different sets of information by clicking on or tapping a tab button. Tabs are used to keep information organized on the wiki, especially to display differing sets of information between two or more versions of a game or subject (such as list tables and stat tables), as well to cut down on page length.
Tabs should be used whenever there is a need to display more than one set of information related to the subject or topic. For examples: a Demon's ally and enemy stat tables; Social Link information by Rank; multiple encounter list tables showing the differences between two versions of a game, etc.
This documentation explains how to use Tabs. For guidelines on Tabs usage, see Tabs guidelines.
Usage
General
Tabs are created by giving each tab a label parameter and placing content in-between the labels, such as:
{{Tabs
|Tab 1|
Tab 1's information here.
|Tab 2|
Tab 2's information here.
}}
Tab 1's information here.
Tab 2's information here.
Tabs can use wikitext and even some other templates for a variety of desired effects, such as small text or tooltips as necessary. For example:
{{Tabs
|Tab 1 <small>(Small)</small>|
Tab 1's information here.
|Tab 2{{Exp|This is a tooltip}}|
Tab 2's information here.
}}
Tab 1's information here.
Tab 2's information here.
Stat Tables
Tabs can be used to display two or more sets of stat tables for a given subject, such as a Demon's ally and enemy stat tables. This can be done by placing the stat tables' code between each label, like so:
{{Tabs
|Ally|
{{SMT5 Ally Demon Stats
|img=Jack Frost
|name=Jack Frost
|level=25
|hp=119
|mp=153
|st=14
|vi=15
|ma=29
|ag=21
|lu=21
|location=[[Shinagawa Pier (Shin Megami Tensei V)|Shinagawa Pier]]
|race=Fairy
|cost=8,568
|gifttype=Ice
|fire=Wk
|ice=Drn
|firefrac=1.25
|charm=Wk
|charmfrac=1.25
|spfire=-5
|spice=+4
|splight=+2
|skills={{Skill|SMT5|Jack Bufula +4|-}}
{{Skill|SMT5|Ice Breath +4|-}}
{{Skill|SMT5|Ice Block|26}}
{{Skill|SMT5|Mahama +2|27}}
{{Skill|SMT5|Resist Light|28}}
}}
|Enemy|
{{SMT5 Enemy Demon Stats
|img=Jack Frost
|name=Jack Frost
|level=25
|hp=200
|mp=?
|st=14
|vi=15
|ma=29
|ag=21
|lu=21
|location=[[Shinagawa Pier (Shin Megami Tensei V)|Shinagawa Pier]]
|race=Fairy
|exp=
|macca=
|recruit=y
|speech=
|drop1=
|droprate1=
|drop2=
|droprate2=
|drop3=
|droprate3=
|fire=Wk
|ice=Drn
|firefrac=1.25
|charm=Wk
|charmfrac=1.25
|spfire=-5
|spice=+4
|splight=+2
|skills={{Skill|SMT5|Jack Bufula +4}}
{{Skill|SMT5|Ice Breath +4}}
}}
}}
Remember to close the Tabs template by adding its own }}
at the end, otherwise the Tabs template will break. You may find it helpful to enable the Syntax Highlighter in Preferences under Gadgets to visually see if all templates have been closed. (The page's proceeding content will all be highlighted yellow if any templates are not properly closed.)
List Table Templates
List table templates using multiple header and row templates often require |}
at the end to be closed. However, because the pipe would be read as the start of a new parameter in Tabs, the |}
must be substituted with {{!}}}
(with 3 curly brackets following !) to retain the table's functionality. For example:
{{Tabs
|MT1|
{{EnctrAlign/Header}}
{{EnctrAlign|name=[[Ghost (Demon)|Ghost]]|race=[[Spirit]]|align=Evil|level=—|note=}}
{{EnctrAlign|name=[[Gnome]]|race=[[Jirae]]|align=Neutral|level=5|note=}}
{{EnctrAlign|name=[[Green Slime]]|race=[[Mononoke]]|align=Evil|level=—|note=}}
{{!}}}
|KMT|
{{EnctrAlign/Header}}
{{EnctrAlign|name=[[Ghost (Demon)|Ghost]]|race=[[Spirit]]|align=Evil|level=8|note=}}
{{EnctrAlign|name=[[Gnome]]|race=[[Jirae]]|align=Neutral|level=3|note=}}
{{EnctrAlign|name=[[Green Slime]]|race=[[Foul]]|align=Evil|level=1|note=}}
{{!}}}
}}
Custom Wikitables
Due to incompatibilities with the Tabs template, regular wikitables constructed of wikitext cannot be used with tabs. To overcome this, use Template:Table. See its documentation for more information.