Template:Collapsible list/Documentation: Difference between revisions

Template page
(doc for simplified collapsible list)
 
m (update doc for parserfunc version again)
Line 1: Line 1:
This template creates a collapsible area.
This template creates a collapsible list with room for up to 50 items.


==Parameters==
==Parameters==
;Unnamed
;Unnamed
There is one unnamed parameter to use. For instance '''<tt><nowiki>{{collapsible list|one}}</nowiki></tt>''' will result in:
These range from 1–50 and don't require a parameter name. For instance '''<tt><nowiki>{{collapsible list|one|two|three}}</nowiki></tt>''' will result in:


{{collapsible list|one}}
{{collapsible list|one|two|three}}


;Named parameters
;Named parameters
These parameters are all technically optional, but it is suggested that you at least give the '''<tt>title</tt>''' parameter.
These parameters are all technically optional, but it is suggested that you at least give the '''<tt>title</tt>''' parameter.
*'''<tt>title</tt>''': The title of the list. Default is "List".
*'''<tt>title</tt>''': The title of the list. Default is "List".
*'''<tt>expand</tt>''': Putting something here will make the list expanded on page load. Default is collapsed.
*'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;".
*'''<tt>framestyle</tt>''': CSS styling for the entire list container. Default is "border:none; padding:0;".
*'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;font-size:12px".
*'''<tt>titlestyle</tt>''': CSS styling for the title element. Default is "background:transparent;font-size:12px".
Line 18: Line 19:
<pre>{{collapsible list
<pre>{{collapsible list
|one
|one
|two
|three
|title=Example list
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|liststyle=text-align:left;color:blue;margin-left:10px;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}</pre>
}}</pre>
{{Collapsible List
{{collapsible list
|one
|one
|two
|three
|title=Example list
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|titlestyle=background-color:pink;padding:2px;text-align:center;
Line 33: Line 40:


;Within another element
;Within another element
<pre>{{Collapsible List|one}}</pre>
<pre>{{collapsible list|{{us|2009|October 14}}|{{jp|2009|November 15}}|{{eu|2009|December 4}}|title=Release dates}}</pre>


{|{{prettytable|style=width:250px}}
{|{{prettytable|style=width:250px}}
! Example table
! Example table
|-
|-
| {{Collapsible List|one}}
| {{collapsible list|one|two|three}}
|}
|}
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Revision as of 08:02, 8 February 2022

This template creates a collapsible list with room for up to 50 items.

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.
  • framestyle: CSS styling for the entire list container. Default is "border:none; padding:0;".
  • titlestyle: CSS styling for the title element. Default is "background:transparent;font-size:12px".
  • liststyle: CSS styling for the list itself. Default is "text-align:left;".

Examples

Standalone template
{{collapsible list
|one
|two
|three
|title=Example list
|expand=yes
|framestyle=padding:3px;border:1px solid black;
|titlestyle=background-color:pink;padding:2px;text-align:center;
|liststyle=text-align:left;color:blue;margin-left:10px;
}}
Example list
one
two
three


Within another element
{{collapsible list|{{us|2009|October 14}}|{{jp|2009|November 15}}|{{eu|2009|December 4}}|title=Release dates}}
Example table
List
one
two
three