Difference between revisions of "Template:LeftBSCollapsible/doc"

From Persona MUSH Wiki
Jump to: navigation, search
(Created page with "== Scope == This template is based off of Template:LeftBS, but implements collapsible boxes. There are a few important differences: * Use Template:BoxEndCollapsible ...")
 
m
Line 36: Line 36:
 
|id=example1}}
 
|id=example1}}
 
</pre>
 
</pre>
 +
{{LeftBSCollapsible
 +
|title=Example 1
 +
|id=example1
 +
}}
 +
Content Here
 +
{{BoxEndCollapsible
 +
|id=example1}}
  
 
With some custom colors
 
With some custom colors
 
<pre>
 
<pre>
{{LeftBS
+
{{LeftBSCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
 +
|headcolor = DDFCDD
 
|title=Example 2
 
|title=Example 2
 
|id=example2
 
|id=example2
Line 47: Line 55:
 
{{BoxEndCollapsible
 
{{BoxEndCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
|title=Example 2
+
|headcolor = DDFCDD
 
|id=example2
 
|id=example2
 
}}
 
}}
 
</pre>
 
</pre>
 +
{{LeftBSCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 +
|title=Example 2
 +
|id=example2
 +
}}
 +
Content Here
 +
{{BoxEndCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 +
|id=example2
 +
}}
  
 
Two boxes, one collapsed and one not.
 
Two boxes, one collapsed and one not.
 
<pre>
 
<pre>
{{LeftBS
+
{{LeftBSCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
 +
|headcolor = DDFCDD
 
|title=Example 3
 
|title=Example 3
 
|id=example3
 
|id=example3
Line 63: Line 84:
 
{{BoxEndCollapsible
 
{{BoxEndCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
 +
|headcolor = DDFCDD
 
|title=Example 3
 
|title=Example 3
 
|id=example3
 
|id=example3
 
}}
 
}}
  
{{LeftBS
+
{{LeftBSCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
 +
|headcolor = DDFCDD
 
|title=Example 4
 
|title=Example 4
 
|id=example4
 
|id=example4
Line 75: Line 98:
 
{{BoxEndCollapsible
 
{{BoxEndCollapsible
 
|bgcolor = FCDDDD  
 
|bgcolor = FCDDDD  
 +
|headcolor = DDFCDD
 +
|title=Example 4
 +
|id=example4
 +
}}
 +
</pre>
 +
{{LeftBSCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 +
|title=Example 3
 +
|id=example3
 +
|collapsed=1
 +
}}
 +
Collapsed
 +
{{BoxEndCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 +
|title=Example 3
 +
|id=example3
 +
}}
 +
 +
{{LeftBSCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 +
|title=Example 4
 +
|id=example4
 +
}}
 +
Uncollapsed
 +
{{BoxEndCollapsible
 +
|bgcolor = FCDDDD
 +
|headcolor = DDFCDD
 
|title=Example 4
 
|title=Example 4
 
|id=example4
 
|id=example4
 
}}
 
}}

Revision as of 04:29, 11 July 2012

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 = Whether or not this box is collapsed by default when the page is first loaded. Specify "1" if needed, otherwise you don't need to specify it.
|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