跳转到内容

模板:Navbox subgroup/doc:修订间差异

来自戏曲百科
创建页面,内容为“<!-- 在本行下編輯模板說明 --> {{tl|Navbox}}的輔助模版,支援子項目生成,現支援40個子項目生成。 可以同一行多次引用。 常…”
 
无编辑摘要
 
(未显示同一用户的1个中间版本)
第1行: 第1行:
<!-- 在本行下編輯模板說明 -->
{{tl|Navbox}}的輔助模版,支援子項目生成,現支援40個子項目生成。
可以同一行多次引用。
常用參數封裝到{{tl|大家族模板子项}}中。
使用方法見於https://zh.wikipedia.org/wiki/Template:Navbox_subgroup
<!--<includeonly>{{Esoteric}}</includeonly><noinclude>{{template doc page viewed directly}}</noinclude>
<!-- 在本行下編輯模板說明 -->
{{Navbox suite}}
{{Navbox suite}}
本模板被设计与{{tl|Navbox}}或其他[[Wikipedia:导航模板|导航模板]]共同使用,它们允许创建带分组抬头或标题的链接列表。这个模板允许创建子分组,整个子分组能被赋值作为{{tl|Navbox}}内的一个列表项。一个子分组可以容纳最多22个列表项。
本模板被设计与{{tl|Navbox}}或其他[[Wikipedia:导航模板|导航模板]]共同使用,它们允许创建带分组抬头或标题的链接列表。这个模板允许创建子分组,整个子分组能被赋值作为{{tl|Navbox}}内的一个列表项。一个子分组可以容纳最多22个列表项。
第93行: 第82行:
  -->
  -->
== 设置分组的宽度 ==
== 设置分组的宽度 ==
若有多个{{tl|Navbox subgroup}}模板被用在父级{{tl|Navbox}}的内部,如果这些分组的宽度比较协调的话,通常看起来会更美观,为了做到这一点,使用者必须设定<code>groupstyle</code>参数来控制想要的宽度,以及设定<code>liststyle</code>参数来获得width:auto(由于HTML/CSS的原因)。例如,放置以下代码到每个{{tl|Navbox subgroup}}中来调整宽度:
若有多个{{t1|Navbox subgroup}}模板被用在父级{{t1|Navbox}}的内部,如果这些分组的宽度比较协调的话,通常看起来会更美观,为了做到这一点,使用者必须设定<code>groupstyle</code>参数来控制想要的宽度,以及设定<code>liststyle</code>参数来获得width:auto(由于HTML/CSS的原因)。例如,放置以下代码到每个{{t1|Navbox subgroup}}中来调整宽度:
:<code>groupstyle = width:10em;</code>
:<code>groupstyle = width:10em;</code>
:<code>liststyle = width:auto;</code>
:<code>liststyle = width:auto;</code>
<!--  
<!--  
If multiple {{tl|Navbox subgroup}} templates are used inside of a parent {{tl|Navbox}}, it generally looks better if the width of the groups matches up.  In order to do this, one must set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons).  For example, place the following code in each {{tl|Navbox subgroup}} to adjust the widths:
If multiple {{t1|Navbox subgroup}} templates are used inside of a parent {{t1|Navbox}}, it generally looks better if the width of the groups matches up.  In order to do this, one must set the <code>groupstyle</code> parameters to contain the desired width, and the <code>liststyle</code> parameters to have width:auto (due to HTML/CSS reasons).  For example, place the following code in each {{t1|Navbox subgroup}} to adjust the widths:
:<code>groupstyle = width:10em;</code>
:<code>groupstyle = width:10em;</code>
:<code>liststyle = width:auto;</code>
:<code>liststyle = width:auto;</code>
第103行: 第92行:
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters.
If you also use the <code>image</code> or <code>imageleft</code> parameters, then you will most likely also need to set their width manually using the <code>imagestyle</code> and <code>imageleftstyle</code> parameters.
-->
-->
== 举例 ==
== 举例 ==
=== 例1 ===
=== 例1 ===
第112行: 第100行:
{{Navbox
{{Navbox
| state  = uncollapsed
| state  = uncollapsed
| name  = Protected Areas of Colorado
| name  = Navbox subgroup
| title  = Protected Areas of Colorado
| title  = Protected Areas of Colorado
| group1 = National Park Service
| group1 = National Park Service
第118行: 第106行:
   {{Navbox subgroup
   {{Navbox subgroup
   | group1 = National Parks
   | group1 = National Parks
   | list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{w}}[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{w}}[[Mesa Verde National Park|Mesa Verde]]{{w}}[[Rocky Mountain National Park|Rocky Mountain]]
   | list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{}} [[Mesa Verde National Park|Mesa Verde]]{{}} [[Rocky Mountain National Park|Rocky Mountain]]
   | group2 = National Monuments
   | group2 = National Monuments
   | list2  = [[Colorado National Monument|Colorado]]{{w}}[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{w}}[[Hovenweep National Monument|Hovenweep]]{{w}}[[Yucca House National Monument|Yucca House]]
   | list2  = [[Colorado National Monument|Colorado]]{{}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{}} [[Hovenweep National Monument|Hovenweep]]{{}} [[Yucca House National Monument|Yucca House]]
   | group3 = National Historic Sites
   | group3 = National Historic Sites
   | list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{w}}[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   | list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   | group4 = National Recreation Area
   | group4 = National Recreation Area
   | list4  = [[Curecanti National Recreation Area|Curecanti]]
   | list4  = [[Curecanti National Recreation Area|Curecanti]]
   }}
   }}
| group2 = National Forests
| group2 = National Forests
| list2  = [[Arapaho National Forest|Arapaho]]{{w}}[[Grand Mesa National Forest|Grand Mesa]]{{w}}[[Gunnison National Forest|Gunnison]]{{w}}[[Pike National Forest|Pike]]{{w}}[[Rio Grande National Forest|Rio Grande]]{{w}}[[Roosevelt National Forest|Roosevelt]]{{w}}[[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{w}}[[San Isabel National Forest|San Isabel]]{{w}}[[San Juan National Forest|San Juan]]{{w}}[[Uncompahgre National Forest|Uncompahgre]]{{w}}[[White River National Forest|White River]]
| list2  = [[Arapaho National Forest|Arapaho]]{{}} [[Grand Mesa National Forest|Grand Mesa]]{{}} [[Gunnison National Forest|Gunnison]]{{}} [[Pike National Forest|Pike]]{{}} [[Rio Grande National Forest|Rio Grande]]{{}} [[Roosevelt National Forest|Roosevelt]]{{}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{}} [[San Isabel National Forest|San Isabel]]{{}} [[San Juan National Forest|San Juan]]{{}} [[Uncompahgre National Forest|Uncompahgre]]{{}} [[White River National Forest|White River]]
}}
}}


第138行: 第126行:
   {{Navbox subgroup
   {{Navbox subgroup
   |group1 = National Parks
   |group1 = National Parks
   |list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{w}}[[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{w}}[[Mesa Verde National Park|Mesa Verde]]{{w}}[[Rocky Mountain National Park|Rocky Mountain]]
   |list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{}} [[Mesa Verde National Park|Mesa Verde]]{{}} [[Rocky Mountain National Park|Rocky Mountain]]
   |group2 = National Monuments
   |group2 = National Monuments
   |list2  = [[Colorado National Monument|Colorado]]{{w}}[[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{w}}[[Hovenweep National Monument|Hovenweep]]{{w}}[[Yucca House National Monument|Yucca House]]
   |list2  = [[Colorado National Monument|Colorado]]{{}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{}} [[Hovenweep National Monument|Hovenweep]]{{}} [[Yucca House National Monument|Yucca House]]
   |group3 = National Historic Sites
   |group3 = National Historic Sites
   |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{w}}[[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   |group4 = National Recreation Area
   |group4 = National Recreation Area
   |list4  = [[Curecanti National Recreation Area|Curecanti]]
   |list4  = [[Curecanti National Recreation Area|Curecanti]]
   }}
   }}
| group2 = National Forests
| group2 = National Forests
| list2  = [[Arapaho National Forest|Arapaho]]{{w}}[[Grand Mesa National Forest|Grand Mesa]]{{w}}[[Gunnison National Forest|Gunnison]]{{w}}[[Pike National Forest|Pike]]{{w}}[[Rio Grande National Forest|Rio Grande]]{{w}}[[Roosevelt National Forest|Roosevelt]]{{w}}[[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{w}}[[San Isabel National Forest|San Isabel]]{{w}}[[San Juan National Forest|San Juan]]{{w}}[[Uncompahgre National Forest|Uncompahgre]]{{w}}[[White River National Forest|White River]]
| list2  = [[Arapaho National Forest|Arapaho]]{{}} [[Grand Mesa National Forest|Grand Mesa]]{{}} [[Gunnison National Forest|Gunnison]]{{}} [[Pike National Forest|Pike]]{{}} [[Rio Grande National Forest|Rio Grande]]{{}} [[Roosevelt National Forest|Roosevelt]]{{}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{}} [[San Isabel National Forest|San Isabel]]{{}} [[San Juan National Forest|San Juan]]{{}} [[Uncompahgre National Forest|Uncompahgre]]{{}} [[White River National Forest|White River]]
}}
}}
</pre>
</pre>
第158行: 第146行:
{{Navbox
{{Navbox
| state = expanded
| state = expanded
| name  = Roman Emperors
| name  = Navbox subgroup
| title = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| group1 = Crisis 235 AD - 284 AD
| list1  = [[Maximinus Thrax]]{{w}}[[Gordian I]]{{w}}[[Gordian II]]{{w}}[[Pupienus]] and [[Balbinus]]{{w}}[[Gordian III]]{{w}}[[Philip the Arab]]{{w}}[[Decius]]{{w}}[[Trebonianus Gallus]]{{w}}[[Aemilianus]]{{w}}[[Valerian (emperor)|Valerian]]{{w}}[[Gallienus]]{{w}}[[Claudius II]]{{w}}[[Quintillus]]{{w}}[[Aurelian]]{{w}}[[Marcus Claudius Tacitus]]{{w}}[[Florianus]]{{w}}[[Probus]]{{w}}[[Carus]]{{w}}[[Numerian]]{{w}}[[Carinus]]
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
| group2 = Dominate
| group2 = Dominate
| list2  =  
| list2  =  
第167行: 第155行:
   |list1style = background:#ddf;
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[Diocletian]]{{w}}[[Maximian]]{{w}}[[Constantius Chlorus|Constantius I]]{{w}}[[Galerius]]{{w}}[[Flavius Valerius Severus|Severus II]]{{w}}[[Maxentius]]{{w}}[[Maximinus]]{{w}}[[Licinius]]{{w}}[[Constantine I]]{{w}}[[Constantine II (emperor)|Constantine II]]{{w}}[[Constans|Constans I]]{{w}}[[Constantius II]]{{w}}[[Julian the Apostate]]{{w}}[[Jovian]]{{w}}[[Valentinian I]]{{w}}[[Valens]]{{w}}[[Gratian]]{{w}}[[Valentinian II]]{{w}}[[Eugenius]]{{w}}[[Theodosius I]]
   |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
   |list3style = background:#ddf;
   |list3style = background:#ddf;
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list4 = [[Honorius (emperor)|Honorius]]{{w}}[[Constantius III]]{{w}}[[Joannes]]{{w}}[[Valentinian III]]{{w}}[[Petronius Maximus]]{{w}}[[Avitus]]{{w}}[[Majorian]]{{w}}[[Libius Severus]]{{w}}[[Anthemius]]{{w}}[[Olybrius]]{{w}}[[Glycerius]]{{w}}[[Julius Nepos]]{{w}}[[Romulus Augustus]]
   |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
   }}
   }}
}}
}}
第179行: 第167行:
| title = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| group1 = Crisis 235 AD - 284 AD
| list1  = [[Maximinus Thrax]]{{w}}[[Gordian I]]{{w}}[[Gordian II]]{{w}}[[Pupienus]] and [[Balbinus]]{{w}}[[Gordian III]]{{w}}[[Philip the Arab]]{{w}}[[Decius]]{{w}}[[Trebonianus Gallus]]{{w}}[[Aemilianus]]{{w}}[[Valerian (emperor)|Valerian]]{{w}}[[Gallienus]]{{w}}[[Claudius II]]{{w}}[[Quintillus]]{{w}}[[Aurelian]]{{w}}[[Marcus Claudius Tacitus]]{{w}}[[Florianus]]{{w}}[[Probus]]{{w}}[[Carus]]{{w}}[[Numerian]]{{w}}[[Carinus]]
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
| group2 = Dominate
| group2 = Dominate
| list2  =  
| list2  =  
第185行: 第173行:
   |list1style = background:#ddf;
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[Diocletian]]{{w}}[[Maximian]]{{w}}[[Constantius Chlorus|Constantius I]]{{w}}[[Galerius]]{{w}}[[Flavius Valerius Severus|Severus II]]{{w}}[[Maxentius]]{{w}}[[Maximinus]]{{w}}[[Licinius]]{{w}}[[Constantine I]]{{w}}[[Constantine II (emperor)|Constantine II]]{{w}}[[Constans|Constans I]]{{w}}[[Constantius II]]{{w}}[[Julian the Apostate]]{{w}}[[Jovian]]{{w}}[[Valentinian I]]{{w}}[[Valens]]{{w}}[[Gratian]]{{w}}[[Valentinian II]]{{w}}[[Eugenius]]{{w}}[[Theodosius I]]
   |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
   |list3style = background:#ddf;
   |list3style = background:#ddf;
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list4 = [[Honorius (emperor)|Honorius]]{{w}}[[Constantius III]]{{w}}[[Joannes]]{{w}}[[Valentinian III]]{{w}}[[Petronius Maximus]]{{w}}[[Avitus]]{{w}}[[Majorian]]{{w}}[[Libius Severus]]{{w}}[[Anthemius]]{{w}}[[Olybrius]]{{w}}[[Glycerius]]{{w}}[[Julius Nepos]]{{w}}[[Romulus Augustus]]
   |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
&nbsp;&nbsp;}}
&nbsp;&nbsp;}}
}}
}}
第196行: 第184行:


* {{tl|Navbox}} &ndash; 基本的导航模板。
* {{tl|Navbox}} &ndash; 基本的导航模板。
* {{tl|Navbox with columns}} &ndash; 允许分列(columns)代替分组/列表(groups/lists)。
* {{t1|Navbox with columns}} &ndash; 允许分列(columns)代替分组/列表(groups/lists)。
* {{tl|Navbox with collapsible groups}} &ndash; 另一个变体。
* {{t1|Navbox with collapsible groups}} &ndash; 另一个变体。
* {{tl|Nobold}} &ndash; 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。
* {{t1|Nobold}} &ndash; 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。


{{Navigational templates}}
<includeonly>
<includeonly>
<!-- 本行下加入模板的分類 -->
<!-- 本行下加入模板的分類 -->
[[Category:導航模板]]
[[Category:導航模板|{{PAGENAME}}]]
[[Category:格式模板]]
[[Category:格式模板|{{PAGENAME}}]]
 
</includeonly>
</includeonly>
<noinclude>[[Category:模板說明文件]]</noinclude>

2021年6月17日 (四) 19:23的最新版本

本模板被设计与{{Navbox}}或其他导航模板共同使用,它们允许创建带分组抬头或标题的链接列表。这个模板允许创建子分组,整个子分组能被赋值作为{{Navbox}}内的一个列表项。一个子分组可以容纳最多22个列表项。

用法

{{Navbox subgroup
| groupstyle = 
| liststyle  = 

| group1 = 
| list1  = 
| group2 = 
| list2  = 
...
| group22 = 
| list22  = 
}}

参数说明

本模板的参数与{{Navbox}}的类似。

单元格

listn
(即list1list2、……list22)本模板的主体,通常是一些链接的一个列表。格式是内联(inline)。最少而言一个list参数是必需的。每个追加的list都会显示在表格的单独一行。每个listn可以以一个相应的groupn参数为先导,如果提供了的话(见下方)。列表项(以及整个表格)的背景颜色缺省为transparent,因而它显示与父导航框所用的相同的背景色。
groupn
(即group1group2、……group22)如果指定了的话,一个抬头单元格会显示在listn左侧,其中显现指定的文字。如果忽略了的话,listn会占用表格的全部宽度。背景颜色缺省为#ddf,但是能够通过groupstyle参数进行更改(见下方)。

样式

bodystyle
指定CSS样式,应用于模板主体。例如:
background:#nnnnnn;
text-align:[right/center/left/justified];
groupstyle
CSS样式,应用于groupn单元格。这个选项优先于任何应用到整个表格的样式。例如:
background:#nnnnnn;
text-align:[left/center/right];
vertical-align:[top/middle/bottom];
white-space:nowrap;
liststyle
CSS样式,应用于所有列表项。如果指定了oddstyleevenstyle参数的话(见下方),则会覆盖本参数。
oddstyle
evenstyle
CSS样式,分别应用于奇数编号列表项(list1list3等等)或偶数编号列表项(list2list4等等)。典型地被用来设定背景颜色(background:#nnnnnn;),以达到在奇数和偶数编号列表之间实现一个交互的背景颜色。

设置分组的宽度

若有多个{{Navbox subgroup}}模板被用在父级{{Navbox}}的内部,如果这些分组的宽度比较协调的话,通常看起来会更美观,为了做到这一点,使用者必须设定groupstyle参数来控制想要的宽度,以及设定liststyle参数来获得width:auto(由于HTML/CSS的原因)。例如,放置以下代码到每个{{Navbox subgroup}}中来调整宽度:

groupstyle = width:10em;
liststyle = width:auto;

举例

例1

下面是一个在Navbox模板内部使用Navbox subgroup的示例。

{{Navbox
| name   = Protected Areas of Colorado
| title  = Protected Areas of Colorado
| group1 = National Park Service
| list1  = 
  {{Navbox subgroup
   |group1 = National Parks
   |list1  = [[Black Canyon of the Gunnison National Park|Black Canyon of the Gunnison]]{{•}} [[Great Sand Dunes National Park and Preserve|Great Sand Dunes]]{{•}} [[Mesa Verde National Park|Mesa Verde]]{{•}} [[Rocky Mountain National Park|Rocky Mountain]]
   |group2 = National Monuments
   |list2  = [[Colorado National Monument|Colorado]]{{•}} [[Florissant Fossil Beds National Monument|Florissant Fossil Beds]]{{•}} [[Hovenweep National Monument|Hovenweep]]{{•}} [[Yucca House National Monument|Yucca House]]
   |group3 = National Historic Sites
   |list3  = [[Bent's Old Fort National Historic Site|Bent's Old Fort]]{{•}} [[Sand Creek Massacre National Historic Site|Sand Creek Massacre]]
   |group4 = National Recreation Area
   |list4  = [[Curecanti National Recreation Area|Curecanti]]
  }}
| group2 = National Forests
| list2  = [[Arapaho National Forest|Arapaho]]{{•}} [[Grand Mesa National Forest|Grand Mesa]]{{•}} [[Gunnison National Forest|Gunnison]]{{•}} [[Pike National Forest|Pike]]{{•}} [[Rio Grande National Forest|Rio Grande]]{{•}} [[Roosevelt National Forest|Roosevelt]]{{•}} [[Medicine Bow - Routt National Forest|Medicine Bow - Routt]]{{•}} [[San Isabel National Forest|San Isabel]]{{•}} [[San Juan National Forest|San Juan]]{{•}} [[Uncompahgre National Forest|Uncompahgre]]{{•}} [[White River National Forest|White River]]
}}

例2

这个示例实现了水平分组标题,方法是将标题分配到list1list3,将链接分配到list2list4,然后使用list1stylelist3style来设定标题的背景颜色。

{{Navbox
| name  = Roman Emperors
| title = Roman Emperors
| group1 = Crisis 235 AD - 284 AD
| list1  = [[Maximinus Thrax]]{{·}} [[Gordian I]]{{·}} [[Gordian II]]{{·}} [[Pupienus]] and [[Balbinus]]{{·}} [[Gordian III]]{{·}} [[Philip the Arab]]{{·}} [[Decius]]{{·}} [[Trebonianus Gallus]]{{·}} [[Aemilianus]]{{·}} [[Valerian (emperor)|Valerian]]{{·}} [[Gallienus]]{{·}} [[Claudius II]]{{·}} [[Quintillus]]{{·}} [[Aurelian]]{{·}} [[Marcus Claudius Tacitus]]{{·}} [[Florianus]]{{·}} [[Probus]]{{·}} [[Carus]]{{·}} [[Numerian]]{{·}} [[Carinus]]
| group2 = Dominate
| list2  = 
  {{Navbox subgroup
   |list1style = background:#ddf;
   |list1 = '''284 AD - 395 AD'''
   |list2 = [[Diocletian]]{{·}} [[Maximian]]{{·}} [[Constantius Chlorus|Constantius I]]{{·}} [[Galerius]]{{·}} [[Flavius Valerius Severus|Severus II]]{{·}} [[Maxentius]]{{·}} [[Maximinus]]{{·}} [[Licinius]]{{·}} [[Constantine I]]{{·}} [[Constantine II (emperor)|Constantine II]]{{·}} [[Constans|Constans I]]{{·}} [[Constantius II]]{{·}} [[Julian the Apostate]]{{·}} [[Jovian]]{{·}} [[Valentinian I]]{{·}} [[Valens]]{{·}} [[Gratian]]{{·}} [[Valentinian II]]{{·}} [[Eugenius]]{{·}} [[Theodosius I]]
   |list3style = background:#ddf;
   |list3 = '''Western Empire (393 AD - 476 AD)'''
   |list4 = [[Honorius (emperor)|Honorius]]{{·}} [[Constantius III]]{{·}} [[Joannes]]{{·}} [[Valentinian III]]{{·}} [[Petronius Maximus]]{{·}} [[Avitus]]{{·}} [[Majorian]]{{·}} [[Libius Severus]]{{·}} [[Anthemius]]{{·}} [[Olybrius]]{{·}} [[Glycerius]]{{·}} [[Julius Nepos]]{{·}} [[Romulus Augustus]]
  }}
}}

參見

  • {{Navbox}} – 基本的导航模板。
  • {{Navbox with columns}} – 允许分列(columns)代替分组/列表(groups/lists)。
  • {{Navbox with collapsible groups}} – 另一个变体。
  • {{Nobold}} – 用于在缺省字体宽度是粗体的上下文环境中,例如表格中的标题单元格中,用普通字体宽度来显示文字。
導航模板比較
可摺疊性 標題顏色 圖像 組別 樣式(主體)
參數
範例
{{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模板