查看“模板:Navbox with collapsible groups/doc”的源代码
←
模板:Navbox with collapsible groups/doc
跳转至:
导航
,
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于这些用户组的用户使用:
用户
,
管理员
,Editor
您没有权限编辑
模板
名字空间内的页面。
您可以查看与复制此页面的源代码。
<noinclude>{{template doc page viewed directly}}</noinclude> {{复杂模板}} 这个模板产生的[[zhwiki:Wikipedia:导航模板|导航模板]]含有许多个group。所有组别下的文章都是关于统一个主题的。所有group在默认状态下都是隐藏的。但是通过呼叫一个参数(点击右上角的“显示”),一个单独的group可以被展开。 == 用法 == 模板当前支持20个groups/lists,但如果需要,可以加入更多的group。你至少应该使用2个groups/lists,否则请使用{{tl|Navbox}}。 <pre>{{Navbox with collapsible groups |name = {{subst:PAGENAME}} |state = |selected = {{{1|}}} |title = |titlestyle = |groupstyle = |image = |group1 = |abbr1 = |list1 = |group2 = |abbr2 = |list2 = ... |group10 = |abbr10 = |list10 = }}</pre> == 参数 == 这个模板和它的姐妹模板{{tl|Navbox}}和{{tl|Navbox with columns}}使用许多通用的参数。通用参数用一个十字符号<sup>'''†'''</sup>标明。要深入了解这些参数的相信介绍和实例,请参见{{tl|Navbox}}。 ===属性参数=== :;name<sup>†</sup> ::模板名。比如模板的名字可以是“Navbox with collapsible groups。” :; ''state''<sup>†</sup> <span style="font-weight:normal;">[<code>autocollapse, uncollapsed, collapsed, plain, off</code>]</span> ::主标题显示/隐藏的初始状态。更多信息请查看{{tl|Navbox}}。这不影响其下各group的显示或隐藏状态,参加下面的''state<sub>n</sub>''。 :;''navbar''<sup>†</sup> ::可取的值为<code>plain</code>,<code>off</code>,以及默认的留空。更多信息请查看{{tl|Navbox}}。 :;''border''<sup>†</sup> ::可取的值为<code>child</code>,<code>none</code>,以及默认的留空。如果你希望将一个导航框(navbox)置于另一个navbox之内,则设为<code>child</code>;选择这个值时,子navbox将紧贴在父navbox内,没有边框。父navbox可以是{{tl|Navbox}}的list区,也可以是{{tl|Navbox with columns}}的一个栏(column),{{tl|Navbox with collapsible groups}}的list区。更多信息和范例请查看{{tl|Navbox}}。 ===基本数据参数=== :;'''''title'''''<sup>†</sup> ::模板的标题,在顶端的标题栏居中显示。 :;''above''<sup>†</sup> ::在groups/lists上方显示的文字或者其他元素。 :;''image''<sup>†</sup> ::在所有groups/lists右边显示的图片。 :;''imageleft''<sup>†</sup> ::在所有groups/lists左边显示的图片。 :;''below''<sup>†</sup> ::在groups/lists下方显示的文字或者其他元素。 ===groups/lists参数=== :; ''group<sub>n</sub>''<sup>†</sup> ::每部分的标题。 :; ''list<sub>n</sub>''<sup>†</sup> ::在group中显示的内容/维基链接。用 . (dot)或者{{·}}(<nowiki>{{·}}</nowiki>,bullet)作为分隔符(见[[#參見]])。可以选择将一个{{tl|Navbox}}或者{{tl|Navbox with columns}}置于此处,要用到它的<code>border = child</code>参数。如果已经这样做,请将对应的group <sub>n</sub> 留空,因为它的子navbox已经提供了收起(collapsible)功能。 :; ''abbr<sub>n</sub>'' ::这是group的缩写。参见下面的参数以了解如何使用。这个参数<code>selected</code>是可选的,但建议使用。 :; ''selected'' ::如果<code>selected</code>的值与 <code>abbr<sub>n</sub></code> 的值相同,则第 <sub>n</sub> list是展开的,而所有其他list是收起的。如果将<code>selected</code>留空,或者它不与任何 <code>abbr<sub>n</sub></code> 想比配,则所有group都是收起的。一般将这个参数设为<tt><nowiki>{{{1|}}}</nowiki></tt>。Since this template is a base template for others, there has to be a way to pass the group parameter from the article, to the secondary template to this one. :; ''state<sub>n</sub>'' <span style="font-weight:normal;">[<code>autocollapse, uncollapsed, collapsed, plain, off</code>]</span> ::list<sub>n</sub> 展开/收起的初始状态。默认状态为收起。如果<code>selected</code>与 <code>abbr<sub>n</sub></code> 相同,则改为展开。 :; ''image<sub>n</sub>'' ::出现在list<sub>n</sub> 内容区右边的一个图片。 :; ''imageleft<sub>n</sub>'' ::出现在list<sub>n</sub> 内容区左边的一个图片。 ===样式参数=== :;''bodystyle''<sup>†</sup> ::应用于整个模板的[[zhwiki:Wikipedia:CSS|CSS]]样式 :;''titlestyle''<sup>†</sup> ::应用于标题栏的CSS样式;一般设为<code>background:''color''</code>。维基链接文字的颜色必须使用span标签手动调整。例如使用<code><nowiki>title = [[Scouting|<span style="color:ivory;">Scouting</span>]]</nowiki></code>将链接的颜色改为改变ivory。“显示”/“隐藏”按键和“查”“论”“编”链接按键使用标题样式参数中设定的颜色。这里是一个设置标题样式的范例: :::<code>titlestyle = background:darkgreen;color:ivory;</code> :;''abovestyle''<sup>†</sup> :;''belowstyle''<sup>†</sup> ::分别应用于''above'' and ''below''参数的CSS样式。 :;''basestyle''<sup>†</sup> ::'''同时'''应用于''title'',''above'',''below''和''group<sub>n</sub>''的CSS样式。 :;''imagestyle''<sup>†</sup> ::应用于''image''参数的CSS样式。不适用于 image<sub>n</sub> 参数。 :;''imageleftstyle''<sup>†</sup> ::应用于''imageleft''参数的CSS样式。不适用于 imageleft<sub>n</sub> 参数。 :; ''groupstyle''<sup>†</sup> ::应用于所有group头部参数的CSS样式。访问[http://meyerweb.com/eric/tools/color-blend/ 这个网站]以获得与头部背景色相似的明亮颜色。范例: :::<code>groupstyle = background:lightgreen;</code> :; ''group<sub>n</sub>''style<sup>†</sup> ::应用于特定group头部的CSS样式;能改变在''groupstyle''中已经设定过的任何CSS样式。 :; ''liststyle''<sup>†</sup> ::应用于所有list内容参数的CSS样式。 :; ''list<sub>n</sub>''style<sup>†</sup> ::应用于特定list内容的CSS样式;能改变在''liststyle''中已经设定过的任何CSS样式。 :; ''listpadding''<sup>†</sup> :: 每个list单元格的边距;默认状态下,左右为0.25em,上下为0em。 == 範例 == <pre style="overflow:scroll;"> {{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|Michigan Stadium]]{{·}} [[Crisler Arena|Crisler Arena]]{{·}} [[Yost Ice Arena|Yost Ice Arena]]{{·}} [[Michigan Wolverines|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|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]] }} </pre> {{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; |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 |list2 = [[Michigan Stadium|Michigan Stadium]]{{·}} [[Crisler Arena|Crisler Arena]]{{·}} [[Yost Ice Arena|Yost Ice Arena]]{{·}} [[Michigan Wolverines|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|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]] }} == 參見 == * {{tl|Navbox}} – 基本導航框。 * {{tl|Navbox subgroup}} – 允許在導航框內分組。 * {{tl|Navbox with columns}} – 允許以欄取代組別/list。
该页面使用的模板:
模板:Color
(
查看源代码
)
模板:Info
(
查看源代码
)
模板:Lan
(
查看源代码
)
模板:Mbox
(
查看源代码
)
模板:Namespace detect
(
查看源代码
)
模板:Navbar
(
查看源代码
)
模板:Navbox
(
查看源代码
)
模板:Navbox with collapsible groups
(
查看源代码
)
模板:Ombox
(
查看源代码
)
模板:Ombox/core
(
查看源代码
)
模板:Template doc page viewed directly
(
查看源代码
)
模板:Tl
(
查看源代码
)
模板:·
(
查看源代码
)
模板:复杂模板
(
查看源代码
)
返回至
模板:Navbox with collapsible groups/doc
。
导航菜单
个人工具
创建账户
登录
命名空间
模板
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
讨论版
提问求助区
帮助
帮助
沙盒
编辑教程
创建新条目
工具
链入页面
相关更改
特殊页面
页面信息
返回顶部
评论预览
×