Trang bản mẫu bị khóa vĩnh viễn

Bản mẫu:Navbox with collapsible groups

Bách khoa toàn thư mở Wikipedia
Bước tới điều hướng Bước tới tìm kiếm
Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Sử dụng

{{Navbox with collapsible groups
|name = {{subst:PAGENAME}}
|state = 
|selected = {{{1|}}}

|title = 
|titlestyle = 
|groupstyle = 
|image = 

|group1 = 
|abbr1 = 
|list1 =

|group2 = 
|abbr2 = 
|list2 = 

 ...

|group20 = 
|abbr20 = 
|list20 = 
}}

Ví dụ

Ví dụ cơ bản

  {{Navbox with collapsible groups
  |name = University of Michigan
  |state = uncollapsed
  |title = [[University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]]
  |titlestyle = background:#00008B;color:#FFD700;
  |listclass = hlist
  |groupstyle = background:#FFD700;color:#00008B;
  |image = 
  |selected = {{{1|}}}
  
  |group1 = [[University of Michigan#Academic profile|<span style="color:#00008B;">Academics</span>]]
  |abbr1 = academics
  |list1 =
  * [[University of Michigan College of Engineering|College of Engineering]]
  * [[University of Michigan College of Literature, Science, and the Arts|College of Literature, Science and the Arts]]
  * [[Gerald R. Ford School of Public Policy]]
  * [[University of Michigan Law School|Law School]]
  * [[University of Michigan Health System|Medical School]]
  * [[Ross School of Business]]
  * [[University of Michigan School of Education|School of Education]]
  * [[University of Michigan School of Information|School of Information]]
  * [[University of Michigan School of Music, Theatre & Dance|School of Music, Theatre & Dance]]
  * [[University of Michigan School of Natural Resources and Environment|School of Natural Resources and Environment]]
  * [[University of Michigan School of Public Health|School of Public Health]]
  * [[Taubman College of Architecture and Urban Planning]]
  
  |group2 = [[Michigan Wolverines|<span style="color:#00008B;">Athletics</span>]]
  |abbr2 = athletics
  |state2 = uncollapsed
  |list2 =
  * [[Michigan Stadium]]
  * [[Crisler Arena]]
  * [[Yost Ice Arena]]
  * [[Michigan Wolverines]]
  * [[Michigan Wolverines football|Football]]
  * [[Michigan – Ohio State football rivalry|UM-OSU Rivalry]]
  * [[Little Brown Jug (American football)|Little Brown Jug]]
  * [[Paul Bunyan Trophy]]
  * [[Cold War (ice hockey)|Cold War]]
  
  |group3 = Campus
  |abbr3 = campus
  |list3 =
  * [[Angell Hall Observatory]]
  * [[Burton Memorial Tower|Burton Tower]]
  * [[The Diag]]
  * [[David M. Dennison Building|Dennison Building]]
  * [[Gerald R. Ford Presidential Library]]
  * [[Hill Auditorium]]
  * [[Lurie Tower]]
  * [[Matthaei Botanical Gardens]]
  * [[Michigan Union]]
  * [[Museums at the University of Michigan|Museums]]
  * [[Nichols Arboretum]]
  * [[University of Michigan Health System|UM Health System]]
  * [[University of Michigan Library|University Library]]
  }}

Nesting other Navbox forms

This example shows {{Navbox}}, {{Navbox with collapsible groups}} and {{Navbox with columns}} all working together. Press the edit button for the section to view the code. Note that each of the child navboxes has the first parameter set to child

Nesting Navboxes to get more groups/lists

You can conveniently nest Navboxes, including {{Navbox with collapsible groups}}, to get an unlimited number of groups/lists. The following example uses one instance of {{Navbox with collapsible groups}} to get the first 10 collapsible groups, a nested instance to get the next 10, and another nested instance to get the last 6. See the code to learn how it works. It is fairly simple to extend this to as many groups/lists as you like: