Template:Collaptogg list

From Wikisource
Jump to: navigation, search
Documentation icon Template documentation[view] [edit] [history] [purge]


Usage[edit]

This template displays the first parameter (the header) with a ▼ (show) link on the right. If ▼ is clicked by the user, the second parameter (the content) is also displayed.

Optional parameters[edit]

  • style - add CSS to the main div
  • headerstyle - add CSS to the header
  • contentstyle - add CSS to the content
  • toggle - set to 'left' to move [show/hide] button and the title to the lefthand side

Restrictions[edit]

Do not prefix the template with colon ":", otherwise the second parameter will not be hidden.

Examples[edit]

{{Collaptogg list|1=parameter one|2=parameter two}}
produces


{{Collaptogg list|toggle=left|1={{gap|3em}}toggled to the left, parameter one|2=parameter two}}
produces


:{{Collaptogg list|1=prefixed with colon parameter one|2=prefixed with colon parameter two}}
produces

prefixed with colon parameter two


{{Collaptogg list|style=background:yellow|1=parameter one|2=parameter two}}
produces


{{Collaptogg list|style=width: 50%;|headerstyle=background:#d0ffd0;|contentstyle=background:#ffe0e0;color:blue;|1=parameter one|2=parameter two}}
produces