మూస:Collapsible list/doc
స్వరూపం
మూస:Strong for మూస:Terminate sentence It may contain usage information, categories and other content that is not part of the original మూస page. |
This template produces a collapsible list. It is possible to set w:CSS styles for the "frame" (the <div></div>
tags surrounding the list), for the list title, and for the list items. The template supports an unlimited number of list items.
- See Original Template & Doc
Syntax
[మార్చు]{{collapsible list |expand = <!--(optional)--> |framestyle = <!--(optional)--> |titlestyle = <!--(optional)--> |title = |liststyle = <!--(optional)--> |hlist = <!--(optional)--> |bullets = <!--(optional)--> | [1 = ] <!--(First item in list; the "1 =" is usually optional)--> | [2 = ] <!--(Second item in list; ditto)--> | [3 = ] <!--(Third item in list; etc.)---> | ... }}
Parameters
[మార్చు]- Positional parameters (
1
,2
,3
...) - these are the list items. If no list items are present, the module will output nothing. expand
- specifyingexpand = true
, or any non-blank value, will set the default state to expanded.framestyle
- a custom css style for the<div></div>
tags surrounding the list, e.g.font-size: 90%;
.titlestyle
- a custom css style for the<div></div>
tags surrounding the title.title
- the list title.liststyle
- a custom css style for the<ul></ul>
tags surrounding the list.hlist
- specifyinghlist = true
, or any non-blank value, will cause the template to output a horizontal list.bullets
- specifyingbullets = true
, or any non-blank value, will cause the template to produce bullets for each list item.
Examples
[మార్చు]{{Collapsible list |framestyle = border:none; padding:1px; |title = List of Gitmo related EOs |titlestyle = font-weight:bold; color:yellow; margin:0em 4.0em 0.5em 0em; width:400px; |1 = • [[Military Order of November 13, 2001]] |2 = • [[Executive Order 13425]], February 14, 2007 |3 = • [[Executive Order 13440]], July 20, 2007 |4 = • [[Executive Order 13492]], January 22, 2009 }}
List of Gitmo related EOs
- • Military Order of November 13, 2001
- • Executive Order 13425, February 14, 2007
- • Executive Order 13440, July 20, 2007
- • Executive Order 13492, January 22, 2009
Example of a list without borders because it's within an infobox
[మార్చు]In these examples, the fields leader_name2 and leader_name3 have been changed to use collapsible list. {{Infobox settlement |official_name = City of Hamilton |motto = Together Aspire - Together Achieve |image_skyline = HamiltonOntarioSkylineC.JPG |imagesize = 250px |image_caption = |image_map = Map of Ontario HAMILTON.svg |mapsize = 200px |map_caption = Location in the province of Ontario, Canada |subdivision_type = Country |subdivision_name = [[Canada]] |subdivision_type1 = [[Provinces of Canada|Province]] |subdivision_name1 = [[Ontario]] |leader_title = [[Mayor]] |leader_name = [[Fred Eisenberger]] |leader_title1 = [[City Council]] |leader_name1 = [[Hamilton City Council]] |leader_title2 = [[Member of Parliament (Canada)|MPs]] |leader_name2 = {{Collapsible list |framestyle=border:none; padding:0; <!--Hides borders and improves row spacing--> |title=List of MPs |1=[[Dean Allison]] |2=[[Chris Charlton]] |3=[[David Christopherson]] |4=[[Wayne Marston]] |5=[[David Sweet]] }} |leader_title3 = [[Member of Provincial Parliament (Ontario)|MPPs]] |leader_name3 = {{Collapsible list |framestyle=border:none; padding:0; <!--as above--> |title=List of MPPs |1=[[Marie Bountrogianni]] |2=[[Andrea Horwath]] |3=[[Judy Marsales]] |4=[[Ted McMeekin]] |5=[[Jennifer Mossop]] }} |established_title = [[Municipal corporation|Incorporated]] |established_date = June 9, 1846 }} <pre style="font-size:95%; overflow:auto;"> {{Infobox settlement |official_name = City of Hamilton ...truncated... |leader_title = [[Mayor]] |leader_name = [[Fred Eisenberger]] |leader_title1 = [[City Council]] |leader_name1 = [[Hamilton City Council]] |leader_title2 = [[Member of Parliament (Canada)|MPs]] |leader_name2 = {{Collapsible list |framestyle=border:none; padding:0; <!--Hides borders and improves row spacing--> |title=List of MPs |1=[[Dean Allison]] |2=[[Chris Charlton]] |3=[[David Christopherson]] |4=[[Wayne Marston]] |5=[[David Sweet]] }} |leader_title3 = [[Member of Provincial Parliament (Ontario)|MPPs]] |leader_name3 = {{Collapsible list |framestyle=border:none; padding:0; <!--as above--> |title=List of MPPs |1=[[Marie Bountrogianni]] |2=[[Andrea Horwath]] |3=[[Judy Marsales]] |4=[[Ted McMeekin]] |5=[[Jennifer Mossop]] }} |established_title = [[Municipal corporation|Incorporated]] |established_date = June 9, 1846 (...etc...) }}