这个模板产生的导航模板含有许多个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]] }}
|