Template:Dialog/collapsible/doc

Usage
Placing this template on a dialog page indicates &mdash; when viewing the dialog page via dialog action do verb view &mdash; that the first parameter should be displayed with a clickable toggle after it to make the second parameter visible or hidden below it. By default, the second parameter is initially hidden, and the output of this template when viewed directly rather than through the view verb is entirely hidden, even the first parameter.

Two optional parameters can alter these defaults:, and. Non-blank parameter makes the output visible without the view verb and, by default, makes the second parameter initially visible. Non-blank parameter  overrides the defaults for visibility of the second parameter: if , the second parameter is initially hidden even if  is non-blank; and if   has any other non-blank value, when viewed through the verb the second parameter is initially visible.

Internals
When viewing pages directly rather than through the view verb, collapsible boxes are typically handled by javascript run after page load; however, dialog actions are run long after other such javascript code, so that no other javascript operates on text viewed through the verb. This template provides basic collapsibility facilities, similar to those of template hidden.