• 首页
  • 随机
  • 最近更改
  • 特殊页面
  • 社群首页
  • 设置
  • 关于戏曲百科
  • 免责声明
戏曲百科
  • 登录

模板:Navbox with collapsible groups

  • 监视
  • 查看源代码
    • 链入页面
    • 固定链接
    • 页面信息
  • 查
  • 论
  • 编
{{{title}}}
{{{group1}}} or {{{section1}}} or {{{sect1}}}
{{{list1}}} or {{{content1}}}
{{{group2}}} or {{{section2}}} or {{{sect2}}}
{{{list2}}} or {{{content2}}}
{{{group3}}} or {{{section3}}} or {{{sect3}}}
{{{list3}}} or {{{content3}}}
{{{group4}}} or {{{section4}}} or {{{sect4}}}
{{{list4}}} or {{{content4}}}
{{{group5}}} or {{{section5}}} or {{{sect5}}}
{{{list5}}} or {{{content5}}}
(...etc, to group20/sect20/section20 and list20/content20)
模板文档[查看] [编辑] [历史] [清除缓存]
文件:Ambox warning yellow.svg本Template的-{zh-cn:源代码;zh-tw:原始碼;}-中包含了一些精密的可選參數和構造。
建議您於編輯模板前先熟悉其构造與解析器函數。若您的編輯導致了意外的問題,請儘快撤銷編輯,因該模板或於相當數量的頁面中出現。
所有實驗性的编辑可於沙盒模板或者您自己的用戶頁中進行。


导航框系列
{{Navbox}}
{{Navbox subgroup}}
{{Navbox with columns}}
{{Navbox with collapsible groups}}

本模板产生的导航模板含有许多个group。所有组别下的文章都是关于同一个主题的。所有group在默认状态下都是隐藏的,但是通过呼叫一个参数(点击右上角的“显示”),一个单独的group可以被展开。

目录

  • 1 用法
  • 2 参数
    • 2.1 属性参数
    • 2.2 基本数据参数
    • 2.3 groups/lists参数
    • 2.4 样式参数
  • 3 範例
  • 4 參見

用法

模板当前支持10个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}}。

属性参数

name†
模板名。比如模板的名字可以是“Navbox with collapsible groups。”
state† [autocollapse, uncollapsed, collapsed, plain, off]
主标题显示/隐藏的初始状态。更多信息请查看{{Navbox}}。这不影响其下各group的显示或隐藏状态,参加下面的staten。
navbar†
可取的值为plain,off,以及默认的留空。更多信息请查看{{Navbox}}。
border†
可取的值为child,none,以及默认的留空。如果你希望将一个导航框(navbox)置于另一个navbox之内,则设为child;选择这个值时,子navbox将紧贴在父navbox内,没有边框。父navbox可以是{{Navbox}}的list区,也可以是{{Navbox with columns}}的一个栏(column),{{Navbox with collapsible groups}}的list区。更多信息和范例请查看{{Navbox}}。

基本数据参数

title†
模板的标题,在顶端的标题栏居中显示。
above†
在groups/lists上方显示的文字或者其他元素。
image†
在所有groups/lists右边显示的图片。
imageleft†
在所有groups/lists左边显示的图片。
below†
在groups/lists下方显示的文字或者其他元素。

groups/lists参数

groupn†
每部分的标题。
listn†
在group中显示的内容/维基链接。用 . (dot)或者 · ({{·}},bullet)作为分隔符(见参见)。可以选择将一个{{Navbox}}或者{{Navbox with columns}}置于此处,要用到它的border = child参数。如果已经这样做,请将对应的group n 留空,因为它的子navbox已经提供了收起(collapsible)功能。
abbrn
这是group的缩写。参见下面的参数以了解如何使用。selected参数是可选的,但建议使用。
selected
如果selected的值与 abbrn 的值相同,则第 n list是展开的,而所有其他list是收起的。如果将selected留空,或者它不与任何 abbrn 想匹配,则所有group都是收起的。一般将这个参数设为{{{1|}}}。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.
staten [autocollapse, uncollapsed, collapsed, plain, off]
listn 展开/收起的初始状态。默认状态为收起。如果selected与 abbrn 相同,则改为展开。
imagen
出现在listn 内容区右边的一个图片。
imageleftn
出现在listn 内容区左边的一个图片。

样式参数

bodystyle†
应用于整个模板的CSS样式
titlestyle†
应用于标题栏的CSS样式;一般设为background:color。维基链接文字的颜色必须使用span标签手动调整。例如使用title = [[Scouting|<span style="color:ivory;">Scouting</span>]]将链接的颜色改为改变ivory。“显示”/“隐藏”按键和“查”“论”“编”链接按键使用标题样式参数中设定的颜色。这里是一个设置标题样式的范例:
titlestyle = background:darkgreen;color:ivory;
abovestyle†
belowstyle†
分别应用于above and below参数的CSS样式。
basestyle†
同时应用于title,above,below和groupn的CSS样式。
imagestyle†
应用于image参数的CSS样式。不适用于 imagen 参数。
imageleftstyle†
应用于imageleft参数的CSS样式。不适用于 imageleftn 参数。
groupstyle†
应用于所有group头部参数的CSS样式。访问this website以获得与头部背景色相似的明亮颜色。范例:
groupstyle = background:lightgreen;
groupnstyle†
应用于特定group头部的CSS样式;能改变在groupstyle中已经设定过的任何CSS样式。
liststyle†
应用于所有list内容参数的CSS样式。
listnstyle†
应用于特定list内容的CSS样式;能改变在liststyle中已经设定过的任何CSS样式。
listpadding†
每个list单元格的边距;默认状态下,左右为0.25em,上下为0em。

範例

{{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]]

}}
  • 查
  • 论
  • 编
The University of Michigan, Ann Arbor
Academics
College of Engineering · College of Literature, Science and the Arts · Gerald R. Ford School of Public Policy · Law School · Medical School · Ross School of Business · School of Education · School of Information · School of Music, Theatre & Dance · School of Natural Resources and Environment · School of Public Health · Taubman College of Architecture and Urban Planning
Athletics
Michigan Stadium · Crisler Arena · Yost Ice Arena · Michigan Wolverines · Football · UM-OSU Rivalry · Little Brown Jug · Paul Bunyan Trophy · Cold War
Campus
Angell Hall Observatory · Burton Tower · The Diag · Dennison Building · Gerald R. Ford Presidential Library · Hill Auditorium · Lurie Tower · Matthaei Botanical Gardens · Michigan Union · Museums · Nichols Arboretum · UM Health System · University Library

參見

  • {{Navbox}} – 基本導航框。
  • {{Navbox subgroup}} – 允許在導航框內分組。
  • {{Navbox with columns}} – 允許以欄取代組別/list。
導航模板比較
  • 查看
  • 讨论
  • 编辑
可摺疊性 標題顏色 圖像 組別 樣式(主體)
參數
範例
{{Navbox}} 可摺疊 navbox 主體左/右側 是 是 {{H:f Help}}
{{Navbox with columns}} 可摺疊 navbox 欄左/右側 否 是 {{APEC}}
{{NavboxYears}} 可摺疊 navbox 否 否 否
{{Navbox with collapsible groups}} 可摺疊 navbox 主體左/右側 及/或 在每列表中 是 是 {{ATI}}
摺疊屬性
類別 CSS class Javascript 何時摺疊 自定義
初始狀態
套疊結構
Collapsible tables collapsible 於Common.js定義 頁面上有2個或以上的autocollapse模板 是 是
上述文档嵌入自模板:Navbox with collapsible groups/doc。 (编辑 | 历史)
编者可以在本模板的沙盒 (创建 | 镜像)和测试样例 (创建)页面进行实验。
请在/doc子页面中添加分类。 本模板的子页面。
检索自“https://wiki66.com/index.php?title=模板:Navbox_with_collapsible_groups&oldid=46821”
分类:​
  • 没有使用水平列表的导航框
  • 含有受损文件链接的页面
  • 精密模板
  • 使用背景颜色的导航框
  • 導航模板
  • 摺疊模板
  • 格式模板
最后编辑于2021年6月17日 (星期四) 03:47

语言

    此页面在其他语言不可用。

    戏曲百科
    • 本页面最后编辑于2021年6月17日 (星期四) 03:47。
    • 错误反馈
    • 关于戏曲百科
    • 免责声明
    • 豫ICP备13003402号-1
    • 桌面版