Jump to content

ແມ່ແບບ:Collapsible list

ຈາກ ວິກິພີເດຍ
Documentation icon ຄູ່ມືການໃຊ້ງານແມ່ແບບ[ເບິ່ງ] [ແກ້] [ປະຫວັດ] [ລ້າງແຄຊ]

This template produces a collapsible list. It is possible to set 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.

{{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 - specifying expand = 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.
  • titlestyle - a custom css style for the <ul>...</ul> tags surrounding the list.
  • hlist - specifying hlist = true, or any non-blank value, will cause the template to output a horizontal list.
  • bullets - specifying bullets = true, or any non-blank value, will cause the template to produce bullets for each list item.
{{collapsible list 
 | title = [[European Free Trade Association]] Members 
 | [[Iceland]] 
 | [[Liechtenstein]] 
 | [[Norway]] 
 | [[Switzerland]]
}}

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.

City of Hamilton
ຄຳຂວັນ: 
Together Aspire - Together Achieve
Location in the province of Ontario, Canada
Location in the province of Ontario, Canada
CountryCanada
ProvinceOntario
IncorporatedJune 9, 1846
ການປົກຄອງ
  MayorFred Eisenberger
  City CouncilHamilton, Ontario City Council
  MPs
  MPPs
{{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...)
}}

ຂໍ້ມູນແມ່ແບບ

[ດັດແກ້]
ດ້ານລຸ່ມນີ້ແມ່ນຂໍ້ມູນແມ່ແບບ ເອກະສານກຳກັບສຳລັບແມ່ແບບນີ້ເຊິ່ງໃຊ້ງານໂດຍຕົວຊ່ວຍສ້າງແມ່ແບບ ເຄື່ອງມືແບບແກ້ໄຂແບບເຫັນພາບ ແລະ ເຄື່ອງມືອື່ນ ເບິ່ງລາຍງານການໃຊ້ພາຣາມິເຕີປະຈຳເດືອນສຳລັບແມ່ແບບ:Collapsible list

ຂໍ້ມູນແມ່ແບບສຳລັບ Collapsible list

ສ້າງລາຍການ HTML ທີ່ສາມາດຍຸບໄດ້

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
ຊື່title

ຊື່ຂອງລາຍການ (ສະແດງຢູ່ຂ້າງລິ້ງ [ສະແດງ/ຍຸບ] ຂອງລາຍການສະເໝີ)

Stringsuggested
ລາຍການແນວນອນhlist

Use value 'on' or 'true' to produce a horizontal rather than vertical list

Example
true
Auto value
true
Stringoptional
Bulletsbullets

Set as 'on' or 'true' to place a bullet point before each list item

Example
true
Auto value
true
Stringoptional
ຂະຫຍາຍລາຍການexpand

ຂະຫຍາຍລາຍການແທນທີ່ຈະຍຸບ

Example
true
Auto value
true
Stringoptional
ລາຍການທຳອິດ1

ລາຍການດຽວ

Contentsuggested
Frame styleframestyle frame_style

Custom CSS styling applied the template overall (title and list).

Example
border: 1px;
Stringoptional
Title styletitlestyle title_style

CSS styling applied to the title

Example
color:brown;
Stringoptional
List styleliststyle list_style

CSS styling applied solely to the list itself

Example
list-style-type: square;
Stringoptional
ລາຍການທີສອງ2

ລາຍການດຽວ

Contentsuggested
ລາຍການທີສາມ3

ລາຍການດຽວ

Contentsuggested
ລາຍການທີສີ່4

ລາຍການດຽວ

Contentoptional
55

no description

Contentoptional
66

no description

Contentoptional
77

no description

Contentoptional
88

no description

Contentoptional
99

no description

Contentoptional
1010

no description

Contentoptional