الگو:Sidebar

از ویکی پاسخ
توضیحات الگو[نمایش] [ویرایش] [تاریخچه] [پاکسازی]

این الگوی متا برای ساخت نوار الگوی کناری استفاده می‌گردد. مانند الگوهای ناوبری عمودی.


استفاده

الگوی عمومی و ساده بدون پارامترهای پیچیده:
{{نوار جانبی
| name = {{subst:PAGENAME}}
| pretitle = 
| title = 
| image = 
| headingstyle = 
| contentstyle = 

| above = 

| heading1 = 
| content1 = 

| heading2 = 
| content2 = 

| heading3 = 
| content3 = 

<!-- این روند را برای پارامتر بیشتر میتوانید ادامه دهید: -->

| heading35 = 
| content35 = 

| below = 

}}

پارامترها

هیچ‌کدام از پارامترها اجباری نیستند, و در صورت دیدن الگوی{{navbar}} ن · ب · و در انتهای الگو می‌توانید الگو را نمایش یا ویرایش ویا در بحث مربوط شرکت نمایید.

پارامترهای اصلی

پارامتر توضیح
|name= نام نوار کناری(جانبی) که در جلوی "Template:" در ابتدای متن الگو قرار می‌گیرد.
|outertitle= نامی که در ابتدای نوار دیده خواهدشد.
|topimage= برای گذاردن نگاره(تصویر) دربالای نوار کناری |title= (درصورت لزوم). از سینتاکس ویکی استفاده کنید (مانند [[File:...]]).
برای افزودن توضیح به نگاره از |topcaption= استفاده کنید.
|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. (If |topimage= is used, it will appear immediately below it).
|image= Use to place an image between the |title= (if used) and first section. As with |topimage=, full wiki syntax is expected (i.e. [[File:...]]).
To add a caption below the image, use |caption=.
|headingstyle= Use to alter the default CSS styling set for section headings.
To alter the CSS styling for a specific section's heading, use |headingالگو:Semisubstyle=, 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 |contentالگو:Semisubstyle=, where n is the number of the section.
|heading1=
|content1=
First section's heading / content. content1 is required if heading1 is also to appear.
|heading2=
|content2=
Second section's heading / content. (content2 required if heading2 also to appear; etc.)
|heading3=
|content3=
Third section's heading / content.
...... etc ......
|heading35=
|content35=
Currently, the last possible section heading and/or content.

دیگر پارامترها

پارامتر توضیح
|above= مانند |above= offered by {{Navbox}}.
  • |class= or |bodyclass=
  • |outertitleclass=
  • |topimageclass=
  • |pretitleclass=
  • |titleclass=
  • |imageclass=
  • |aboveclass=
  • |headingclass=
  • |contentclass=
  • |belowclass=

Microformat classes for the corresponding parameters.
(|class= and |bodyclass= are applied across the whole sidebar.)

|below= Same as the |below= offered by {{Navbox}}.
(Use, for example, to add one or more portal links to the bottom of the template (shown, by default, in bold).)
  • |style= or |bodystyle=
  • |outertitlestyle=
  • |topimagestyle=
  • |topcaptionstyle=
  • |pretitlestyle=
  • |titlestyle=
  • |imagestyle=
  • |captionstyle=
  • |abovestyle=
  • |headingstyle=
  • |headingالگو:Semisubstyle=
  • |contentstyle=
  • |contentالگو:Semisubstyle=
  • |belowstyle=
  • |navbarstyle=
      (or |tnavbarstyle=)

Use to alter the default CSS styling for the corresponding parameters.
(|style= and |bodystyle= are applied across the whole sidebar.)

|cellspacing=
|cellpadding=
Use to amend the default cellspacing / cellpadding set for the infobox-class table with which the sidebar is built.
|navbar=  (or |tnavbar=)
Set to "off", "none", etc (without quotes) to remove the {{navbar}} links (·· E) that otherwise appear at the bottom of the sidebar.
|navbarfontstyle=
  (or |tnavbarfontstyle=)
Use to specify the font style used by 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 from becoming too wide. Use {{normalwraplink|longlinkname}}, where |longlinkname is the long link without its square brackets.

Use the |wraplinks=true parameter to turn link wrapping off for the whole template.

کدهای جاسازی

الگوهای نوارکناری را می‌توانید با استفاده‌از |child= در یک الگوی نوار کناری جای دهید. برای ایجاد یک ماژول نوار کناری, یا برای ساخت بخشهای منطقی بیشتر.

{{نوار جانبی
| title = Top-level title
| content1 =
 {{نوار جانبی|child=yes
  | title = First subsection
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| content2 =
 {{نوار جانبی|child=yes
  | title = Second subsection
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

Note in the examples above that the child sidebar is placed in a content field, not a heading field. Notice also that the section subheadings do not appear in bold if this is not explicitly specified. To obtain bold section headings, place the child sidebar in a heading field, using either:

{{نوار جانبی
| title = Top-level title
| heading1 =
 {{نوار جانبی|child=yes
  | title = First subsection
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| heading2 =
 {{نوار جانبی|child=yes
  | title = Second subsection
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

or:

{{نوار جانبی
| title = Top-level title
| heading1 = First subsection
 {{نوار جانبی|child=yes
  | heading1 = Heading 1.1
  | content1 = Content 1.1
 }}
| heading2 = Second subsection
 {{نوار جانبی|child=yes
  | heading1 = Heading 2.1
  | content1 = Content 2.1
 }}
| below = "below" text
}}

Note that omitting the |title= parameter and not including any text preceding the embedded sidebar may result in the creation of gaps by spurious blank rows.

سینتاکس کامل الگو

(omitting heading4/content4 to penultimate heading/content parameters)

{{نوار جانبی
| name = {{subst:PAGENAME}}
| class =            <!-- or: | bodyclass = -->
| style =            <!-- or: | bodystyle = -->
| width = 
| cellspacing = 
| cellpadding = 
| wraplinks =        <!-- "true" otherwise (default:) omit -->

| 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 = 

<!-- etc, to: -->

| heading35style = 
| heading35 = 
| content35style = 
| content35 = 

| belowclass = 
| belowstyle = 
| below = 

| navbarstyle =      <!-- or: | tnavbarstyle = -->
| navbarfontstyle =  <!-- or: | tnavbarfontstyle = -->
| navbar =           <!-- or: | tnavbar = --> <!-- "off", "none", etc otherwise (default:) omit -->

}}

Supplementary documentation

Supplementary related documentation (concerning {{navbar}} use within a sidebar) is at Template:Navbar/doc.

همچنین ببینید