模板:Sidebar/doc
外观
| 此页面是Template:Sidebar的模板文档。 此页面可能包含了模板的使用说明、分类和其他内容。 |
| 此模板使用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
}}
参见
[编辑]