Template:List expand top/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:List expand top. It contains usage information, categories and other content that is not part of the original template page. |
This template is used to create a collapsible hierarchical list.
Usage
Three templates are used in conjunction:
- le top starts a list item that will have hidden sub-items under it
- le mid creates a normal list item in the middle of the list
- le end adds the last list item to be collapsed up under a parent item.
- Parameters
All templates take the hierarchy level (starting with 0 as the highest level) as the first parameter, and the text to display as the list item as the second parameter.
- le top also takes two optional parameters.
|color=
is used to set the list item's background color, and you can use the keyword "nocolor" to suppress any coloring:|color=nocolor
.|show=
is used to start the list item out expanded:|show=yes
.
- le end will also accept no second parameter in cases where you need to end a collapsible section without a list item.
Example
- Top Level
- First sub-level
- First sub-level
- Second sub-level
- Second sub-level
- First sub-level
{{le top|0|Top Level|show=yes}} {{le mid|1|First sub-level}} {{le top|1|First sub-level|color=lightblue}} {{le mid|2|Second sub-level}} {{le end|2|Second sub-level}} {{le end|1|First sub-level}}
See also