வார்ப்புரு:Sidebar/doc
{{documentation subpage}}
 
 This template is intended to be a [[wikt:metatemplate|metatemplate]] for sidebar templates, which are [[Vertical direction|vertically]]-aligned [[Wikipedia:Navigation templates|navigation templates]].  The sidebar is usually positioned on the right-hand side of a page, in the same way as the {{tlx|infobox}} template is aligned for [[Wikipedia:Manual of Style/Infoboxes|infoboxes]]. 
 
 {{tl|Sidebar with collapsible lists}} adds collapsibility to a sidebar's sections, i.e., the means to show or hide sections by clicking links beside their headings.
 
 == Usage ==
 {{Sidebar
 | name = {{PAGENAME}}
 | outertitle = {{{outertitle}}}
 | topimage = {{{topimage}}}
 | topcaption = {{{topcaption}}}
 | pretitle = {{{pretitle}}}
 | title = {{{title}}}
 | image = {{{image}}}
 | above = {{{above}}}
 | heading1 = {{{heading1}}}
 | content1 = {{{content1}}}
 | heading2 = {{{heading2}}}
 | content2 = {{{content2}}}
 | heading3 = {{{heading3}}}
 | content3 = {{{content3}}}
 | content4 = ... up to 35th ...
 | heading35 = {{{heading35}}}
 | content35 = {{{content35}}}
 | below = {{{below}}}
 }}
 
 (parameters with infrequent use omitted)
 &lt;pre style=&quot;overflow:auto;&quot;&gt;
 {{Sidebar
 | name = {{subst:PAGENAME}}
 | outertitle = 
 | topimage = 
 | pretitle = 
 | title = 
 | image = 
 
 | headingstyle = 
 | contentstyle = 
 
 | heading1 = 
 | content1 = 
 
 | heading2 = 
 | content2 = 
 
 | heading3 = 
 | content3 = 
 
 &lt;!--...up to 35th:--&gt;
 
 | heading35 = 
 | content35 = 
 
 }}
 &lt;/pre&gt;
 
 == Parameters ==
 No parameters are required unless {{tl|navbar}} links ({{small|V - T - E}}) are to appear at the bottom of the sidebar, in which case the {{para|name}} parameter is needed (see entry in the table immediately below).
 
 === Principal ===
 {| class=&quot;wikitable&quot; style=&quot;line-height: 1.4em;&quot;
 ! style=&quot;width: 7.0em;&quot; | Parameter !! Explanation
 |- style=&quot;vertical-align: top;&quot;
 | {{para|name}}
 | The sidebar's name, i.e., the name following &quot;Template:&quot; in the page's name. Required for the {{tl|navbar}} links at the bottom of the sidebar to function correctly, unless these are omitted (see {{para|navbar}} at the bottom of this table). It is recommended to use ''&lt;nowiki&gt;{{subst:PAGENAME}}&lt;/nowiki&gt;'' for this field.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|outertitle}}
 | Use to place a title for the sidebar immediately above the sidebar.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|topimage}}
 | Use to place an image at the top of the sidebar, i.e., above any {{para|title}} included.&lt;br /&gt;
 Full wikisyntax expected (i.e., &lt;code&gt;&lt;nowiki&gt;[[File:...]]&lt;/nowiki&gt;&lt;/code&gt;).&lt;br /&gt;
 To add a caption below the image, use {{para|topcaption}}.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|pretitle}}
 | Use to place a line such as &quot;Part of the ''X'' series on&quot; before the title.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|title}}
 | Use to place a title for the sidebar at the top of the sidebar (immediately below the {{para|topimage}}, if used).
 |- style=&quot;vertical-align: top;&quot;
 | {{para|image}}
 | Use to place an image between the {{para|title}} (if used) and first section.&lt;br /&gt;
 As with {{para|topimage}}, full wikisyntax expected (i.e., &lt;code&gt;&lt;nowiki&gt;[[File:...]]&lt;/nowiki&gt;&lt;/code&gt;).&lt;br /&gt;
 To add a caption below the image, use {{para|caption}}.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|headingstyle}}
 | Use to alter the default [[Help:Cascading Style Sheets|CSS]] styling set for section headings.&lt;br /&gt;
 To alter the CSS styling for a specific section's heading, use {{para|heading&lt;sub&gt;n&lt;/sub&gt;style}}, where ''n'' is the number of the section.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|contentstyle}}
 | Use to alter the default CSS styling set for section content.&lt;br /&gt;
 To alter the CSS styling for a particular section's content, use {{para|content&lt;sub&gt;n&lt;/sub&gt;style}}, where ''n'' is the number of the section.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|heading1}} || First section's heading (if needed).
 |-
 | {{para|'''content1'''}} || First section's content (required).
 |- style=&quot;vertical-align: top;&quot;
 | {{para|heading2}} || Second section's heading (if needed).
 |-
 | {{para|content2}} || Second section's content (if needed).
 |- style=&quot;vertical-align: top;&quot;
 | {{para|heading3}} || Third section's heading (if needed).
 |-
 | {{para|content3}} || Third section's content (if needed).
 |-
 | colspan=&quot;2&quot; | ...... etc ......
 |-
 | {{para|heading35}} || rowspan=&quot;2&quot; | Currently, the last possible section heading and/or content (if needed).
 |-
 | {{para|content35}}
 |}
 
 === Other parameters ===
 {| class=&quot;wikitable plainlist&quot; style=&quot;line-height: 1.4em;&quot;
 ! style=&quot;width: 10.0em;&quot; | Parameter !! Explanation
 |- style=&quot;vertical-align: top;&quot;
 | {{para|above}}
 | Corresponds to {{para|above}} offered by {{tl|navbox}}.
 |-
 |
 *{{para|bodyclass}} (or {{para|class}})
 *{{para|outertitleclass}}
 *{{para|topimageclass}}
 *{{para|pretitleclass}}
 *{{para|titleclass}}
 *{{para|imageclass}}
 *{{para|aboveclass}}
 *{{para|headingclass}}
 *{{para|contentclass}}
 *{{para|belowclass}}
 |
 [[Wikipedia:WikiProject Microformats#What are microformats?|Microformat]] classes for the corresponding parameters.&lt;br /&gt;
 ({{para|bodyclass}} (or {{para|class}}) applies to the sidebar as a whole.)
 |- style=&quot;vertical-align: top;&quot;
 | {{para|below}}
 | Use to, e.g., add one or more portal links to the bottom of the template (by default in bold).
 |-
 |
 *{{para|bodystyle}} (or {{para|style}})
 *{{para|outertitlestyle}}
 *{{para|topimagestyle}}
 *{{para|topcaptionstyle}}
 *{{para|pretitlestyle}}
 *{{para|titlestyle}}
 *{{para|imagestyle}}
 *{{para|captionstyle}}
 *{{para|abovestyle}}
 *{{para|headingstyle}}
 *{{para|heading&lt;sub&gt;n&lt;/sub&gt;style}}
 *{{para|contentstyle}}
 *{{para|content&lt;sub&gt;n&lt;/sub&gt;style}}
 *{{para|belowstyle}}
 *{{para|navbarstyle}} (or {{para|tnavbarstyle}})
 |
 Use to alter default [[Help:Cascading Style Sheets|CSS]] styling for the corresponding parameters.&lt;br /&gt;
 ({{para|bodystyle}} (or {{para|style}}) applies to the sidebar as a whole.)
 |- style=&quot;vertical-align: top;&quot;
 | {{para|cellspacing}}
 | Use to amend the default cellspacing set for the infobox-class table with which the sidebar is built.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|cellpadding}}
 | Ditto the default cellpadding.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|navbar}} (or {{para|tnavbar}})
 | Set to &quot;none&quot; (without the quotes) to remove the [[navigation bar]] links appearing at the bottom of the sidebar.
 |- style=&quot;vertical-align: top;&quot;
 | {{para|navbarfontstyle}} (or {{para|tnavbarfontstyle}})
 | Use to specify the font style used by the navbar at the bottom of the sidebar (see {{tl|navbar}} for options available).
 |}
 
 == Handling long links ==
 {{tl|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 from becoming too wide. Use {{tlx|normalwraplink|''longlinkname''}}, where {{para||''longlinkname''}} is the long link without its square brackets.
 
 Use the {{para|wraplinks|true}} parameter to turn link wrapping off for the whole template.
 
 ==Embedding==
 One sidebar template can be embedded into another using the {{para|child}} parameter.  This feature can be used to create a modular sidebar, or to create more well defined logical sections.
 {{sidebar
 | title = Top level title
 | content1 = {{sidebar
   | child = yes
   | title = First subsection
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | content2 = {{sidebar
   | child = yes
   | title = Second subsection
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;pre style=&quot;overflow:auto&quot;&gt;
 {{sidebar
 | title = Top level title
 | content1 = {{sidebar
   | child = yes
   | title = First subsection
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | content2 = {{sidebar
   | child = yes
   | title = Second subsection
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;/pre&gt;
 Note, in the examples above, the child infobox is placed in a &lt;code&gt;content&lt;/code&gt; field, not a &lt;code&gt;heading&lt;/code&gt; field.  Notice that the section subheadings are not in bold font if bolding is not explicitly specified. To obtain bold section headings, place the child infobox in a &lt;code&gt;heading&lt;/code&gt; field, either using
 {{sidebar
 | title = Top level title
 | heading1 = {{sidebar
   | child = yes
   | title = First subsection
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | heading2 = {{sidebar
   | child = yes
   | title = Second subsection
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;pre style=&quot;overflow:auto&quot;&gt;
 {{sidebar
 | title = Top level title
 | heading1 = {{sidebar
   | child = yes
   | title = First subsection
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | heading2 = {{sidebar
   | child = yes
   | title = Second subsection
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;/pre&gt;
 or,
 {{sidebar
 | title = Top level title
 | heading1 = First subsection {{sidebar
   | child = yes
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | heading2 = Second subsection {{sidebar
   | child = yes
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;pre style=&quot;overflow:auto&quot;&gt;
 {{sidebar
 | title = Top level title
 | heading1 = First subsection {{sidebar
   | child = yes
   | heading1 = Heading 1.1
   | content1 = Content 1.1
 }}
 | heading2 = Second subsection {{sidebar
   | child = yes
   | heading1 = Heading 2.1
   | content1 = Content 2.1
 }}
 |belowstyle = 
 |below = Below text
 }}
 &lt;/pre&gt;
 Note that omitting the {{para|title}} parameter, and not including any text preceding the embedded sidebar, may result in spurious blank table rows, creating gaps in the visual presentation.
 
 == Full blank syntax ==
 (omitting sections 4 to penultimate)
 
 &lt;pre style=&quot;overflow:auto;&quot;&gt;
 {{Sidebar
 | name = {{subst:PAGENAME}}
 | class =            &lt;!--or bodyclass--&gt;
 | style =            &lt;!--or bodystyle--&gt;
 | width = 
 | cellspacing = 
 | cellpadding = 
 
 | outertitleclass = 
 | outertitlestyle = 
 | outertitle = 
 
 | topimageclass = 
 | topimagestyle = 
 | topimage = 
 | topcaptionstyle = 
 | topcaption = 
 
 | pretitleclass = 
 | pretitlestyle = 
 | pretitle = 
 
 | titleclass = 
 | title = 
 
 | imageclass = 
 | imagestyle = 
 | image = 
 | captionstyle = 
 | caption = 
 
 | headingclass = 
 | headingstyle = 
 | contentclass = 
 | contentstyle = 
 
 | aboveclass = 
 | abovestyle = 
 | above = 
 
 | heading1style = 
 | heading1 = 
 | content1style = 
 | content1 = 
 
 | heading2style = 
 | heading2 = 
 | content2style = 
 | content2 = 
 
 | heading3style = 
 | heading3 = 
 | content3style = 
 | content3 = 
 
 &lt;!--...up to 35th:--&gt;
 
 | heading35style = 
 | heading35 = 
 | content35style = 
 | content35 = 
 
 | belowclass = 
 | belowstyle = 
 | below = 
 
 | navbarstyle =      &lt;!--or tnavbarstyle--&gt;
 | navbarfontstyle =  &lt;!--or tnavbarfontstyle--&gt;
 | navbar =           &lt;!--or tnavbar--&gt;
 
 | wraplinks =        &lt;!--true or false--&gt;
 
 }}
 &lt;/pre&gt;
 
 == Supplementary documentation ==
 Supplementary documentation relevant to navigational functionality through 'navbar' coding in a sidebar is at [[Template:Navbar/doc]].
 
 == See also ==
 * {{tl|Sidebar with collapsible lists}}
 * {{tl|Infobox}}
 * [[Wikipedia:UBLIST]], for help in using unbulleted lists in fields.
  
 &lt;includeonly&gt;{{#ifeq:{{PAGENAME}}|{{BASEPAGENAME}}|
 [[Category:Sidebar templates| ]]
 [[Category:Exclude in print]]
 [[Category:Wikipedia metatemplates]]
 [[Category:Navigational boxes]]