Template:List expand end

From Sarkarverse
Jump to navigation Jump to search
Documentation icon Template documentation[view] [edit] [history] [purge]

This template is used to create a collapsible hierarchical list.

Usage

Three templates are used in conjunction:

  1. le top starts a list item that will have hidden sub-items under it
  2. le mid creates a normal list item in the middle of the list
  3. 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

{{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