ผลต่างระหว่างรุ่นของ "แม่แบบ:Sidebar"
ล แม่แบบ:Sidebar with heading backgrounds ถูกเปลี่ยนชื่อเป็น แม่แบบ:Sidebar |
ลไม่มีความย่อการแก้ไข |
||
(ไม่แสดง 8 รุ่นระหว่างกลางโดยผู้ใช้ 5 คน) | |||
บรรทัด 1: | บรรทัด 1: | ||
{{Sidebar |
{{#invoke:Sidebar|sidebar}}<noinclude> |
||
{{documentation}}</noinclude> |
|||
|name = {{{name|{{PAGENAME}}}}} |
|||
|class = {{{class|{{{bodyclass|}}}}}} |
|||
|style = <noinclude>width:13.0em;</noinclude> {{{style|{{{bodystyle|}}}}}} |
|||
|cellspacing = {{{cellspacing|0}}} |
|||
|cellpadding = {{{cellpadding|0}}} |
|||
|outertitle = {{{outertitle<includeonly>|</includeonly>}}} |
|||
|outertitleclass = {{{outertitleclass|}}} |
|||
|outertitlestyle = {{{outertitlestyle|}}} |
|||
|topimage = {{#if:{{{topimage<includeonly>|</includeonly>}}} |{{{topimage}}} | }} |
|||
|topimageclass = {{{topimageclass|}}} |
|||
|topimagestyle = {{#if:{{{topimage<includeonly>|</includeonly>}}} |{{{topimagestyle|}}} |padding:0;line-height:0.4em;}} |
|||
|topcaption = {{{topcaption<includeonly>|</includeonly>}}} |
|||
|topcaptionstyle = {{{topcaptionstyle|}}} |
|||
|pretitle = {{{pretitle<includeonly>|</includeonly>}}} |
|||
|pretitlestyle = padding-top:0.2em; {{{pretitlestyle|}}} |
|||
|title = {{{title<includeonly>|</includeonly>}}} |
|||
|titleclass = {{{titleclass|}}} |
|||
|titlestyle = background:#ccf; padding:0.2em 0.4em 0.2em; {{{titlestyle|}}} |
|||
|image = {{{image<includeonly>|</includeonly>}}} |
|||
|imageclass = {{{imageclass|}}} |
|||
|imagestyle = padding:0.4em; {{{imagestyle|}}} |
|||
|caption = {{{caption<includeonly>|</includeonly>}}} |
|||
|captionstyle = {{{captionstyle|}}} |
|||
|headingstyle = background:#ddf; padding:0.2em 0.4em 0.2em; {{{headingstyle|}}} |
|||
|contentstyle = padding:0.3em 0.4em 0.6em; {{{contentstyle|}}} |
|||
<!---Using 'above' to add small gap between title--- |
|||
-------and heading1 if nothing else between:-------> |
|||
|abovestyle = padding:0; line-height:0.4em; |
|||
|above = {{#if:{{{image<includeonly>|</includeonly>}}} |
|||
| |{{#if:{{{title|}}} |
|||
| {{#if:{{{heading1|}}} | }} |
|||
}} |
|||
}} |
|||
|heading1style = {{{heading1style|}}} |
|||
|heading1 = {{{heading1<includeonly>|</includeonly>}}} |
|||
|content1style = {{{content1style|}}} |
|||
|content1 = {{{content1<includeonly>|</includeonly>}}} |
|||
|heading2style = {{{heading2style|}}} |
|||
|heading2 = {{{heading2<includeonly>|</includeonly>}}} |
|||
|content2style = {{{content2style|}}} |
|||
|content2 = {{{content2<includeonly>|</includeonly>}}} |
|||
|heading3style = {{{heading3style|}}} |
|||
|heading3 = {{{heading3<includeonly>|</includeonly>}}} |
|||
|content3style = {{{content3style|}}} |
|||
|content3 = {{{content3<includeonly>|</includeonly>}}} |
|||
|heading4style = {{{heading4style|}}} |
|||
|heading4 = {{{heading4|}}} |
|||
|content4style = {{{content4style|}}} |
|||
|content4 = {{{content4|<noinclude>................</noinclude>}}} |
|||
|heading5style = {{{heading5style|}}} |
|||
|heading5 = {{{heading5|}}} |
|||
|content5style = {{{content5style|}}} |
|||
|content5 = {{{content5|}}} |
|||
|heading6style = {{{heading6style|}}} |
|||
|heading6 = {{{heading6|}}} |
|||
|content6style = {{{content6style|}}} |
|||
|content6 = {{{content6|}}} |
|||
|heading7style = {{{heading7style|}}} |
|||
|heading7 = {{{heading7|}}} |
|||
|content7style = {{{content7style|}}} |
|||
|content7 = {{{content7|}}} |
|||
|heading8style = {{{heading8style|}}} |
|||
|heading8 = {{{heading8|}}} |
|||
|content8style = {{{content8style|}}} |
|||
|content8 = {{{content8|}}} |
|||
|heading9style = {{{heading9style|}}} |
|||
|heading9 = {{{heading9|}}} |
|||
|content9style = {{{content9style|}}} |
|||
|content9 = {{{content9|}}} |
|||
|heading10style = {{{heading10style|}}} |
|||
|heading10 = {{{heading10|}}} |
|||
|content10style = {{{content10style|}}} |
|||
|content10 = {{{content10|}}} |
|||
|heading11style = {{{heading11style|}}} |
|||
|heading11 = {{{heading11|}}} |
|||
|content11style = {{{content11style|}}} |
|||
|content11 = {{{content11|}}} |
|||
|heading12style = {{{heading12style|}}} |
|||
|heading12 = {{{heading12|}}} |
|||
|content12style = {{{content12style|}}} |
|||
|content12 = {{{content12|}}} |
|||
|heading13style = {{{heading13style|}}} |
|||
|heading13 = {{{heading13|}}} |
|||
|content13style = {{{content13style|}}} |
|||
|content13 = {{{content13|}}} |
|||
|heading14style = {{{heading14style|}}} |
|||
|heading14 = {{{heading14|}}} |
|||
|content14style = {{{content14style|}}} |
|||
|content14 = {{{content14|}}} |
|||
|heading15style = {{{heading15style|}}} |
|||
|heading15 = {{{heading15|}}} |
|||
|content15style = {{{content15style|}}} |
|||
|content15 = {{{content15|}}} |
|||
|heading16style = {{{heading16style|}}} |
|||
|heading16 = {{{heading16|}}} |
|||
|content16style = {{{content16style|}}} |
|||
|content16 = {{{content16|}}} |
|||
|heading17style = {{{heading17style|}}} |
|||
|heading17 = {{{heading17|}}} |
|||
|content17style = {{{content17style|}}} |
|||
|content17 = {{{content17|}}} |
|||
|heading18style = {{{heading18style|}}} |
|||
|heading18 = {{{heading18|}}} |
|||
|content18style = {{{content18style|}}} |
|||
|content18 = {{{content18|}}} |
|||
|heading19style = {{{heading19style|}}} |
|||
|heading19 = {{{heading19|}}} |
|||
|content19style = {{{content19style|}}} |
|||
|content19 = {{{content19|}}} |
|||
|heading20style = {{{heading20style|}}} |
|||
|heading20 = {{{heading20|}}} |
|||
|content20style = {{{content20style|}}} |
|||
|content20 = {{{content20|}}} |
|||
|heading21style = {{{heading21style|}}} |
|||
|heading21 = {{{heading21|}}} |
|||
|content21style = {{{content21style|}}} |
|||
|content21 = {{{content21|}}} |
|||
|heading22style = {{{heading22style|}}} |
|||
|heading22 = {{{heading22|}}} |
|||
|content22style = {{{content22style|}}} |
|||
|content22 = {{{content22|}}} |
|||
|heading23style = {{{heading23style|}}} |
|||
|heading23 = {{{heading23|}}} |
|||
|content23style = {{{content23style|}}} |
|||
|content23 = {{{content23|}}} |
|||
|heading24style = {{{heading24style|}}} |
|||
|heading24 = {{{heading24|}}} |
|||
|content24style = {{{content24style|}}} |
|||
|content24 = {{{content24|}}} |
|||
|heading25style = {{{heading25style|}}} |
|||
|heading25 = {{{heading25|}}} |
|||
|content25style = {{{content25style|}}} |
|||
|content25 = {{{content25|}}} |
|||
|heading26style = {{{heading26style|}}} |
|||
|heading26 = {{{heading26|}}} |
|||
|content26style = {{{content26style|}}} |
|||
|content26 = {{{content26|}}} |
|||
|heading27style = {{{heading27style|}}} |
|||
|heading27 = {{{heading27|}}} |
|||
|content27style = {{{content27style|}}} |
|||
|content27 = {{{content27|}}} |
|||
|heading28style = {{{heading28style|}}} |
|||
|heading28 = {{{heading28|}}} |
|||
|content28style = {{{content28style|}}} |
|||
|content28 = {{{content28|}}} |
|||
|heading29style = {{{heading29style|}}} |
|||
|heading29 = {{{heading29|}}} |
|||
|content29style = {{{content29style|}}} |
|||
|content29 = {{{content29|}}} |
|||
|heading30style = {{{heading30style|}}} |
|||
|heading30 = {{{heading30|}}} |
|||
|content30style = {{{content30style|}}} |
|||
|content30 = {{{content30|}}} |
|||
|heading31style = {{{heading31style|}}} |
|||
|heading31 = {{{heading31|}}} |
|||
|content31style = {{{content31style|}}} |
|||
|content31 = {{{content31|}}} |
|||
|heading32style = {{{heading32style|}}} |
|||
|heading32 = {{{heading32|}}} |
|||
|content32style = {{{content32style|}}} |
|||
|content32 = {{{content32|}}} |
|||
|heading33style = {{{heading33style|}}} |
|||
|heading33 = {{{heading33|}}} |
|||
|content33style = {{{content33style|}}} |
|||
|content33 = {{{content33|}}} |
|||
|heading34style = {{{heading34style|}}} |
|||
|heading34 = {{{heading34|}}} |
|||
|content34style = {{{content34style|}}} |
|||
|content34 = {{{content34|}}} |
|||
|heading35style = {{{heading35style|}}} |
|||
|heading35 = {{{heading35<includeonly>|</includeonly>}}} |
|||
|content35style = {{{content35style|}}} |
|||
|content35 = {{{content35<includeonly>|</includeonly>}}} |
|||
|belowstyle = background:#ddf; padding-top:0.3em; {{{belowstyle|}}} |
|||
|below = {{{below<includeonly>|</includeonly>}}} |
|||
|tnavbar = {{{tnavbar|Navbox}}} |
|||
|tnavbarstyle = padding-top:0.4em; {{{tnavbarstyle|}}} |
|||
|tnavbaroptions = {{{tnavbaroptions|}}} |
|||
}}<noinclude> |
|||
{{documentation}} |
|||
[[หมวดหมู่:แม่แบบโครงการพี่น้อง|Sidebar]] |
|||
[[en:Template:Sidebar with heading backgrounds]] |
|||
[[ja:Template:Sidebar with heading backgrounds]] |
|||
[[pt:Predefinição:Sidebar with heading backgrounds]] |
|||
</noinclude> |
รุ่นแก้ไขปัจจุบันเมื่อ 13:38, 9 กุมภาพันธ์ 2565
มีการใช้แม่แบบนี้ประมาณ 1,300 หน้าและการแก้ไขอาจทำให้เกิดผลกระทบหรือสังเกตเห็นได้ ควรทดสอบการเปลี่ยนแปลงในกระบะทราย หรือหน้าทดสอบ หรือในหน้าย่อยผู้ใช้ของคุณเอง อนึ่ง อภิปรายเกี่ยวกับการแก้ไขแม่แบบได้ที่หน้าอภิปรายก่อนที่จะนำไปใช้ |
แม่แบบนี้จะไม่แสดงในมุมมองอุปกรณ์เคลื่อนที่ของวิกิพีเดีย แต่จะแสดงในมุมมองคอมพิวเตอร์ตั้งโต๊ะเท่านั้น อ่านเอกสารกำกับสำหรับคำอธิบาย |
เอกสารประกอบแม่แบบนี้ ขาดหายไป ไม่เพียงพอ หรืออธิบายฟังก์ชันการทำงานและ/หรือพารามิเตอร์ในโค้ดไม่ถูกต้อง โปรดช่วยขยายความและปรับปรุง |
แม่แบบนี้ใช้ลูอา |
This template is a metatemplate for the creation of sidebar templates, i.e. boxes that are vertically aligned navigation templates. Sidebars, like infoboxes, are usually positioned on the right-hand side of a page.
{{Sidebar with collapsible lists}} is a version of {{Sidebar}} that adds collapsibility to its sections, i.e. the means to show or hide sections by clicking links beside their headings.
Note that MOS:LEAD discourages the placement of sidebars in the lead section of articles.
การใช้งาน
[แก้]{{{topimage}}} |
{{{pretitle}}} |
{{{title}}} |
---|
{{{image}}} |
{{{above}}} |
{{{heading1}}} |
{{{content1}}} |
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
…… etc …… |
{{{below}}} |
{{Sidebar | name = {{subst:PAGENAME}} | class = | wraplinks = <!-- "true" otherwise (default:) omit --> | float = | templatestyles = | child templatestyles = | grandchild templatestyles = | outertitleclass = | outertitle = | topimageclass = | topimage = | topcaption = | pretitleclass = | pretitle = | titleclass = | title = | imageclass = | image = | caption = | headingclass = | contentclass = | aboveclass = | above = | heading1 = | heading1class = | content1 = | content1class = | heading2 = | heading2class = | content2 = | content2class = | heading3 = | heading3class = | content3 = | content3class = <!-- (omitting infinite heading/content parameters) --> | belowclass = | below = | navbar = }}
Note that Wikipedia:Manual of Style/Lead section § Elements discourages the placement of sidebars in the lead section of articles, though they may be included on a case-by-case basis.
Parameters
[แก้]No parameters are required unless {{navbar}} links ("v·d·e") are to appear at the bottom of the sidebar, in which case the parameter name is needed (see entry in the table immediately below).
Principal
[แก้]Parameter | Explanation |
---|---|
name | The sidebar's name, i.e. the name following "Template:" in the page's name. Required for the {{navbar}} links at the bottom of the sidebar to function correctly, unless these are omitted (see navbar at the bottom of this table). It is recommended to use {{subst:PAGENAME}} for this field. |
outertitle | Use to place a title for the sidebar immediately above the sidebar. |
topimage | Use to place an image at the top of the sidebar, i.e. above any title included. Full wikisyntax expected (i.e. [[Image:...]] ).To add a caption below the image, use topimagecaption. |
pretitle | Use to place a line such as "Part of the X series on" before the title. |
title | Use to place a title for the sidebar at the top of the sidebar (immediately below the topimage, if used). |
image | Use to place an image between the title (if used) and first section. As with topimage, full wikisyntax expected (i.e. [[Image:...]] ).To add a caption below the image, use imagecaption. |
headingstyle | Use to alter the default CSS styling set for section headings. To alter the CSS styling for a specific section's heading, use headingNstyle, where N is the number of the section. |
contentstyle | Use to alter the default CSS styling set for section content. To alter the CSS styling for a particular section's content, use contentNstyle, where N is the number of the section. |
heading1 | First section's heading (if needed). |
content1 | First section's content (required). |
heading2 | Second section's heading (if needed). |
content2 | Second section's content (if needed). |
heading3 | Third section's heading (if needed). |
content3 | Third section's content (if needed). |
...... etc ...... | |
heading35 | Currently, the last possible section heading and/or content (if needed). |
content35 | |
navbar | Set to "none" (without the quotes) to remove the {{navbar}} links appearing at the bottom of the sidebar. |
Other parameters
[แก้]Parameter | Explanation |
---|---|
above | Corresponds to above parameter offered by {{Navbox}}. |
class (or bodyclass) |
Microformat classes for the corresponding parameters. |
below | Use to e.g. add one or more portal links to the bottom of the template (by default in bold). |
style (or bodystyle) |
Use to alter default CSS styling for the corresponding parameters. |
cellspacing | Use to amend the default cellspacing set for the infobox-class table with which the sidebar is built. |
cellpadding | Ditto the default cellpadding. |
navbaroptions | Use to specify more options for the navbar at the bottom of the sidebar (see {{navbar}} for options available). |
Handling long links
[แก้]{{normalwraplink}} may be used to handle links that should wrap within the sidebar or otherwise need to be made to wrap in order to prevent the sidebar becoming too wide. Use {{normalwraplink|longlinkname}}
, where longlinkname is the long link without its square brackets.
Use the wraplinks
parameter to turn link wrapping off for the whole template.
การใช้งาน
[แก้](omitting sections 4 to penultimate)
{{Sidebar |name = {{subst:PAGENAME}} |class = <!--or bodyclass--> |style = <!--or bodystyle--> |cellspacing = |cellpadding = |sectdivider = |outertitle = |outertitleclass = |outertitlestyle = |topimage = |topimageclass = |topimagestyle = |topcaption = |topcaptionstyle = |pretitle = |pretitlestyle = |title = |titleclass = |titlestyle = |image = |imageclass = |imagestyle = |caption = |captionstyle = |abovestyle = |above = |headingstyle = |contentstyle = |heading1style = |heading1 = |content1style = |content1 = |heading2style = |heading2 = |content2style = |content2 = |heading3style = |heading3 = |content3style = |content3 = <!--etc.--> |heading35style = |heading35 = |content35style = |content35 = |belowstyle = |below = |navbar = |navbarstyle = |navbaroptions = |wraplinks = true/false }}
หมวดหมู่ติดตาม
[แก้]- หมวดหมู่:Pages using sidebar with the child parameter (0)
- หมวดหมู่:Sidebars with styles needing conversion (237)
ดูเพิ่ม
[แก้]- {{Sidebar with collapsible lists}}
- {{กล่องข้อมูล}}
- {{Side box}}
คู่มือการใช้งานที่ปรากฏด้านบนนี้ดึงมาจาก แม่แบบ:Sidebar/doc (แก้ | ประวัติ) ผู้เขียนสามารถทำการทดลองได้ที่กระบะทราย (แก้ | ดูความแตกต่าง) และชุดทดสอบ (แก้) ของแม่แบบนี้ โปรดเพิ่มหมวดหมู่ไปที่หน้าย่อย /doc หน้าย่อยของแม่แบบนี้ |