模板:Sidebar with collapsible lists

模板頁面
於 2023年2月4日 (六) 18:27 由 BXHS-bot 2留言 | 貢獻 所做的修訂 (已保护“Template:Sidebar with collapsible lists”:​机器用户批量保护高风险模板([编辑=仅允许模板编辑员](无限期)[移动=仅允许模板编辑员](无限期)))
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
文檔圖示 模板文件[檢視] [編輯] [查看歷史] [清除快取]

模板鏈接:{{Sidebar with collapsible lists}}是融合模板鏈接:{{Sidebar}}與模板鏈接:{{collapsible list}}的特性,在內容中顯示摺疊顯示的列表的邊欄。

用法

省略不常用的參數。

{{Sidebar with collapsible lists
| name     = {{subst:PAGENAME}}
| pretitle = 
| title    = 
| image    = 
| expanded = {{{expanded|{{{1|}}}}}}

| headingstyle   = 
| listtitlestyle = 
| contentstyle   =   <!--(same as |liststyle = ...?)-->

| heading1   = 
| list1name  = 
| list1title = 
| list1      = 

| heading2   = 
| list2name  = 
| list2title = 
| list2      = 

<!-- ...... -->

| headingN =         <!--(Template:Sidebar's "headingN" and/or "contentN" parameters (where -->
| contentN =         <!-- N is a number) may be used to include uncollapsible lists/content)-->

<!-- ...... -->

| below = 

}}


其中listtitlestyle和liststyle參數等同於模板鏈接:{{collapsible list}}的titlestyle與liststyle參數,而listNtitle與listN參數等同模板鏈接:{{collapsible list}}的title和列表結構塊。要生成列表結構,可以使用模板鏈接:{{DumbList}},或者手動添加。

listNname參數用於標示各個需要展開的列表,參見模板鏈接:{{collapsible lists option}}.

其他摺疊列表相關參數

除上文外,還可以用下列摺疊列表相關參數:

listframestyle
設置列表邊框樣式(參見模板鏈接:{{collapsible list}})
listNframestyle
設置listN的邊框樣式,替換listframestyle
listNtitlestyle
設置listN的標題樣式,替換listtitlestyle
listNstyle
設置listN的背景樣式,替換liststyle

處理長鏈接

就像在模板鏈接:{{Sidebar}}一樣,模板鏈接:{{longlink}}也可以用來處理列表中需要換行的鏈接以防止邊框變得太寬。輸入{{longlink|longlinkname}}longlinkname是除方括號外的鏈接文字。

參見

上述文檔內容嵌入自Template:Sidebar with collapsible lists/doc編輯 | 歷史
編者可以在本模板的沙盒創建 | 鏡像和測試樣例創建頁面進行實驗。
請將模板自身所屬的分類添加在文檔中。本模板的子頁面