Template:FullTocCollapse

This template makes every section at a certain level in the table of contents collapsible. To use it, put it anywhere in the page (but the top is preferred, for the sake of consistently organizing pages). It can receive one argument to specify the level, which defaults to 1 if not provided. If you want only specific sections to be affected (or not), you can use Template:CustomTocCollapse. Using on pages which already have  instead uncollapses the relevant section.

Example: is used here.

Uncollapsed section 2
is used here to cancel the effect of for this heading.

Collapsed section 1
is used here to render this heading collapsible.