Template:LeftBSCollapsible/doc

From Persona MUSH Wiki
Jump to: navigation, search

Scope

This template is based off of Template:LeftBS, but implements collapsible boxes. There are a few important differences:

  • Use Template:BoxEndCollapsible to end this template. Don't use Template:BoxEnd.
  • Template:BoxEndCollapsible requires you to specify parameters, you can't just use {{BoxEndCollapsible}} by itself.
  • Do not start the contents of the box with a | character, this template does that for you. It's necessary to make the javascript work right.
  • Use the "style" and "class" template parameters if you need to set styles for the first table cell.
  • There is a new parameter called "id" that is mandatory for both this template and the {{BoxEndCollapsible}} that terminates it.

It is otherwise identical to Template:LeftBS.

Code

{{LeftBS
|id = A unique ID for this box that does not contain a space. It can be the same as the title if it has no space.
      The same ID must be used for the {{BoxEndCollapsible}} that terminates this template.
|collapsed = Optional. Set collapsed=1 if you want this box collapsed on page load.
|style = The CSS style(s) for the contents of the box. Separate them with semicolons as usual.
|class = The CSS class(es) for the contents of the box.
|maintext = This is the color of the box text. Insert the hex number for the color you want to use. The default is 000000 (aka Black). 
|bgcolor = This is the background color of the box. Insert the hex number for the color you want to use. The default is FFFFFF (aka White). 
|headcolor = This is the background color of the header. Insert the hex number for the color you want to use. The default is A6A6A6 (aka a light gray). 
|headtext = This is the color of the header text. Insert the hex number for the color you want to use. The default is 000000 (aka Black). 
|title=
}}

Usage

With all default colors

{{LeftBSCollapsible
|title=Example 1
|id=example1
}}
Content Here
{{BoxEndCollapsible
|id=example1}}
Example 1

Content Here


With some custom colors

{{LeftBSCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|title=Example 2
|id=example2
}}
Content Here
{{BoxEndCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|id=example2
}}
Example 2

Content Here


Two boxes, one collapsed and one not.

{{LeftBSCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|title=Example 3
|id=example3
|collapsed=1
}}
Content Here
{{BoxEndCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|title=Example 3
|id=example3
}}

{{LeftBSCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|title=Example 4
|id=example4
}}
Content Here
{{BoxEndCollapsible
|bgcolor = FCDDDD 
|headcolor = DDFCDD
|title=Example 4
|id=example4
}}
Example 3

Collapsed



Example 4

Uncollapsed


Personal tools
Namespaces

Variants
Actions
Navigation
Wiki Tools
Toolbox