Template:Tabber/doc: Difference between revisions

From Elwiki
(Created page with "== Overview == This is the refreshed version of Template:Tabs and what you should be using for making tabs now. This version is enhanced with Mobile Frontend support and i...")
 
Line 30: Line 30:
}}
}}


  [[File:Icon - Info.png|20px]] ''Tip'': Nested tabs are also supported.
  [[File:Icon - Info.png|20px]] '''Tip''': Nested tabs are also supported.
{{Tabber
{{Tabber
|Tab 1=
|Tab 1=
Line 49: Line 49:
|Tab 4=Content of tab 4
|Tab 4=Content of tab 4
}}
}}
[[File:Icon - Warning.png|20px]]  '''Warning''': Templates do not work well with tables and other templates, but there is a workaround for that. Before providing the parameter value that contains MediaWiki markup, use <code><nowiki><dfn>{{</dfn></nowiki></code> and insert <code><nowiki><dfn>}}</dfn></nowiki></code> at the end of the parameter's value. Do note that this embeds a little line break. Using this is not required until you notice that something breaks.

Revision as of 23:53, 18 March 2022

Overview

This is the refreshed version of Template:Tabs and what you should be using for making tabs now. This version is enhanced with Mobile Frontend support and is generally cleaned up. Also, the syntax has been updated.

Parameters

 Tip: All parameters get parsed as tab=content, unless they start with the $ sign.
  • $containerclass - adds a custom class to the wrapper of the tabs
  • $containerstyle - adds a style to the wrapper of the tabs
  • $tab[number]style - adds styles to the tab on the specified index
  • $tab[number]style - adds styles to the content box on the specified index
  • $tabstyle - adds styles to tabs
  • $contentsstyle - adds styles to content boxes

Example usage

{{Tabber
|$containerclass=test
|Tab 1=Content of tab 1
|Tab 2=Content of tab 2
|Tab 3=Content of tab 3
|Tab 4=Content of tab 4
}}

Result:

  • Tab 1
  • Tab 2
  • Tab 3
  • Tab 4

Content of tab 1

  Tip: Nested tabs are also supported.
  • Tab 1
  • Tab 2
  • Tab 3
  • Tab 4
  • Tab 1
  • Tab 2
  • Tab 3
  • Tab 4

Content of tab 1

  Warning: Templates do not work well with tables and other templates, but there is a workaround for that. Before providing the parameter value that contains MediaWiki markup, use <dfn>{{</dfn> and insert <dfn>}}</dfn> at the end of the parameter's value. Do note that this embeds a little line break. Using this is not required until you notice that something breaks.