模板:Sidebar
外觀
| 此模板被引用於約13,000個頁面。 為了避免造成大規模的影響,所有對此模板的編輯應先於沙盒、測試樣例或您的沙盒上測試。 測試後無誤的版本可以一次性地加入此模板中,但是修改前請務必於討論頁發起討論。 模板引用數量會自動更新。 |
| 此模板不能在維基百科的移動視圖中顯示,只能在桌面版顯示。請閱讀文檔以獲得解釋。 |
| 此模板使用Lua語言: |
本模板的作用是用來製作側邊顯示的竪式導航模板。就像信息框模板一樣能在條目右邊顯示。
{{Sidebar with collapsible lists}}是帶摺疊參數的版本。
使用class=navbox{{navbox}}或class=nomobile{{sidebar}}類別的樣板,在維基百科的行動版網站上不會顯示於條目空間。2020年至2025年間,流動裝置頁面瀏覽量佔整體瀏覽量的60%至70%。
簡言之,這些樣板不納入條目是因為未針對流動裝置妥善設計,會大幅增加頁面大小,不利於流動裝置下載,且對行動使用場景沒有實質幫助。
你可以檢視或追蹤phab:T124168以獲取更多討論。
請注意,WP:LEADSIDEBAR不建議將側邊欄放在條目的引言段落,不過可依個別情況決定是否納入。
用法
| {{{topimage}}} |
| {{{pretitle}}} |
| {{{title}}} |
|---|
| {{{image}}} |
| {{{above}}} |
| {{{heading1}}} |
| {{{content1}}} |
| {{{heading2}}} |
| {{{content2}}} |
| {{{heading3}}} |
| {{{content3}}} |
| ................ |
| {{{heading35}}} |
| {{{content35}}} |
| {{{below}}} |
省略不常用參數:
{{sidebar
| name = {{subst:PAGENAME}}
| outertitle =
| topimage =
| pretitle =
| title =
| posttitle =
| image =
| headingstyle =
| contentstyle =
| heading1 =
| content1 =
| heading2 =
| content2 =
| heading3 =
| content3 =
...
| heading35 =
| content35 =
}}
Full blank syntax
(omitting sections 4 to penultimate)
{{Sidebar
| name = {{subst:PAGENAME}}
| bodyclass = <!--or class-->
| bodystyle = <!--or style-->
| width =
| cellspacing =
| cellpadding =
| outertitle =
| outertitleclass =
| outertitlestyle =
| topimage =
| topimageclass =
| topimagestyle =
| topcaption =
| topcaptionstyle =
| pretitle =
| pretitleclass =
| pretitlestyle =
| title =
| titleclass =
| posttitle =
| posttitleclass=
| posttitlestyle=
| image =
| imageclass =
| imagestyle =
| caption =
| captionstyle =
| above =
| aboveclass =
| abovestyle =
| headingclass =
| headingstyle =
| contentclass =
| contentstyle =
| heading1style =
| heading1 =
| content1style =
| content1 =
| heading2style =
| heading2 =
| content2style =
| content2 =
| heading3style =
| heading3 =
| content3style =
| content3 =
<!--etc.-->
| heading35style =
| heading35 =
| content35style =
| content35 =
| below =
| belowclass =
| belowstyle =
| navbar = <!--or tnavbar-->
| navbarstyle = <!--or tnavbarstyle-->
| navbarfontstyle = <!--or tnavbarfontstyle-->
| wraplinks = true/false
}}