置顶公告:【置顶】关于临时开启评论区所有功能的公告(2022.10.22) | 【置顶】关于本站Widget恢复使用的公告
  • 你好~!欢迎来到萌娘百科镜像站!如需查看或编辑,请联系本站管理员注册账号。
  • 本镜像站和其他萌娘百科的镜像站无关,请注意分别。

Template:Sandbox/サンムル/Navbox subgroup/doc

猛汉♂百科,万男皆可猛的百科全书!转载请标注来源页面的网页链接,并声明引自猛汉百科。内容不可商用。
跳到导航 跳到搜索
{{Sandbox/サンムル/Navbox subgroup
| groupstyle = 
| liststyle  = 

| group1 = 
| group1state = 
| list1  = 
| group2 = 
| group2state = 
| list2  = 
...
| group22 = 
| group22state = 
| list22  = 
}}

举例

例1

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

{{Navbox
| name   = Protected Areas of Colorado
| title  = Protected Areas of Colorado
| group1 = National Park Service
| list1  = 
  {{Sandbox/サンムル/Navbox subgroup
   |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]]
   |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]]
   |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]]
   |group4 = National Recreation Area
   |list4  = [[Curecanti National Recreation Area|Curecanti]]
  }}
| 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]]
}}

例2

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

{{Navbox
| state = expanded
| name  = Roman Emperors
| title = Roman Emperors
| 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]]
| group2 = Dominate
| list2  = 
  {{Sandbox/サンムル/Navbox subgroup
   |group1style = background:#ddf;
   |group1 = '''284 AD - 395 AD'''
   |group1state = above
   |list1 = [[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]]
   |group2style = background:#ddf;
   |group2 = '''Western Empire (393 AD - 476 AD)'''
   |group2state = above
   |list2 = [[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]]
  }}
}}