此模板基於以下Lua模塊編寫:
模板鏈接:{{Sidebar with collapsible lists}}是融合模板鏈接:{{Sidebar}}與模板鏈接:{{collapsible list}}的特性,在內容中顯示摺疊顯示的列表的邊欄。
用法
{{{pretitle}}} |
{{{title}}} |
---|
{{{image}}} |
{{{heading1}}} |
{{{heading2}}} |
{{{below}}} |
省略不常用的參數。
{{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是除方括號外的鏈接文字。
參見
- 模板鏈接:{{Sidebar}}
- 模板鏈接:{{Collapsible list}}
- 模板鏈接:{{Collapsible lists option}}
- 模板鏈接:{{Navbox with collapsible groups}}