|
這個模板產生的導航模板含有許多個group。所有組別下的文章都是關於統一個主題的。所有group在默認狀態下都是隱藏的。但是通過呼叫一個參數(點擊右上角的「顯示」),一個單獨的group可以被展開。
模板當前支持20個groups/lists,但如果需要,可以加入更多的group。你至少應該使用2個groups/lists,否則請使用{{Navbox}}。
{{Navbox with collapsible groups |name = {{subst:PAGENAME}} |state = |selected = {{{1|}}} |title = |titlestyle = |groupstyle = |image = |group1 = |abbr1 = |list1 = |group2 = |abbr2 = |list2 = ... |group10 = |abbr10 = |list10 = }}
這個模板和它的姐妹模板{{Navbox}}和{{Navbox with columns}}使用許多通用的參數。通用參數用一個十字符號†標明。要深入瞭解這些參數的相信介紹和實例,請參見{{Navbox}}。
autocollapse, uncollapsed, collapsed, plain, off
]plain
,off
,以及默認的留空。更多信息請查看{{Navbox}}。child
,none
,以及默認的留空。如果你希望將一個導航框(navbox)置於另一個navbox之內,則設為child
;選擇這個值時,子navbox將緊貼在父navbox內,沒有邊框。父navbox可以是{{Navbox}}的list區,也可以是{{Navbox with columns}}的一個欄(column),{{Navbox with collapsible groups}}的list區。更多信息和範例請查看{{Navbox}}。border = child
參數。如果已經這樣做,請將對應的group n 留空,因為它的子navbox已經提供了收起(collapsible)功能。selected
是可選的,但建議使用。selected
的值與 abbrn
的值相同,則第 n list是展開的,而所有其他list是收起的。如果將selected
留空,或者它不與任何 abbrn
想比配,則所有group都是收起的。一般將這個參數設為{{{1|}}}。因為本模板是其他模板的基類摸板,所以存在一種方法來從文章中傳遞group
參數到二級模板,並最後傳遞到這個模板。autocollapse, uncollapsed, collapsed, plain, off
]selected
與 abbrn
相同,則改為展開。background:color
。維基連結文字的顏色必須使用span標籤手動調整。例如使用title = [[Scouting|<span style="color:ivory;">Scouting</span>]]
將連結的顏色改為改變ivory。「顯示」/「隱藏」按鍵和「查」「論」「編」連結按鍵使用標題樣式參數中設定的顏色。這裡是一個設置標題樣式的範例:
titlestyle = background:darkgreen;color:ivory;
groupstyle = background:lightgreen;
{{Navbox with collapsible groups |name = University of Michigan |title = [[University of Michigan|<span style="color:#FFD700;">The University of Michigan, Ann Arbor</span>]] |titlestyle = background:#00008B;color:#FFD700; |groupstyle = background:#FFD700;color:#00008B; |image = |selected = {{{1|}}} |state = collapsed |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 |list2 = [[Michigan Stadium]]{{·}} [[Crisler Arena]]{{·}} [[Yost Ice Arena]]{{·}} [[Michigan Wolverines]]{{·}} [[Michigan Wolverines football|Football]]{{·}} [[Michigan-Ohio State rivalry|UM-OSU Rivalry]]{{·}} [[Little Brown Jug (football)|Little Brown Jug]]{{·}} [[Paul Bunyan Trophy]]{{·}} [[Cold War (ice hockey)|Cold War]] |group3 = Campus |abbr3 = campus |list3 = [[Angell Hall Observatory]]{{·}} [[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]] }}
|