Template:Collapsible list code style: Difference between revisions

Template page
m (less test more force)
m (bold text)
 
Line 1: Line 1:
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="display:inline-block;">
<div class="mw-collapsible {{#if:{{{expand|}}}||mw-collapsed}}" style="display:inline-block;">
     <div class="mw-collapsible-header" style="overflow:auto;padding-right:1em;"><!--
     <div class="mw-collapsible-header" style="overflow:auto;padding-right:1em;font-weight:bold"><!--
     -->{{{title|List}}}<!--
     -->{{{title|List}}}<!--
  --></div>
  --></div>

Latest revision as of 16:25, 8 February 2022

List

This page has been transcluded from Template:Collapsible list code style/Documentation.


This template creates a

List

with room for up to 50 items using a code-like styling including monospace font.

Parameters

Unnamed

These range from 1–50 and don't require a parameter name. For instance {{collapsible list|one|two|three}} will result in:

List
one
two
three
Named parameters

These parameters are all technically optional, but it is suggested that you at least give the title parameter.

  • title: The title of the list. Default is "List".
  • expand: Putting something here will make the list expanded on page load. Default is collapsed.

Examples

Standalone template
{{collapsible list code style
|one
|two
|three
|title=Example list
|expand=yes
}}
Example list
one
two
three


Within another element
{{collapsible list code style|one|two|three}}
Example table
List
one
two
three