Шаблон:Sidebar

Матеріал з Вікіпедії — вільної енциклопедії.
(Перенаправлено з Шаблон:Бічна навігація)
Перейти до навігації Перейти до пошуку
{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Цей шаблон є меташаблоном для створення шаблонів бічної панелі, тобто box'и, які вертикально[en] вирівняними шаблонами навігації. Бічні панелі (sidebar'и), як і інфобокси, зазвичай розміщуються в правій частині сторінки.

{{Sidebar with collapsible lists}} — це версія {{Sidebar}}, яка додає збірність до своїх розділів, тобто засоби показу або приховування розділів, натискаючи посилання біля їх заголовків.

Навігаційні та інші шаблони, що використовують класи navbox (navbox) або nomobile (sidebar), не показуються на мобільному вебсайті Вікіпедії, що становить приблизно 60% читачів.

Використання

(параметри при нечастому використанні опущені):

{{Sidebar
| style = 
| name = {{subst:PAGENAME}}
| pretitle = 
| title = 
| image = 
| headingstyle = 
| contentstyle = 

| above = 

| heading1 = 
| content1 = 

| heading2 = 
| content2 = 

| heading3 = 
| content3 = 

<!-- та ін., тощо: -->

| heading35 = 
| content35 = 

| below = 

}}

Параметри

Параметри не обов'язкові, але якщо П · О · Р {{navbar}} посилання внизу {{Side box}} повинні функціонувати правильно (перегляньте параметр navbar нижче), потрібно встановити параметр name (до назви сторінки[en] бічної панелі). (Це не застосовується, якщо виробляється модуль Lua на {{Sidebar}}, Модуль:Sidebar, використовується безпосередньо).

Основні параметри

Параметр Тлумачення
|name= The sidebar's name, i.e. the name following "Template:" in the title shown at the top of the sidebar's page.
Required if the ·· E {{navbar}} links at the bottom of the sidebar are to function correctly, unless their appearance is suppressed (see the navbar parameter below) or {{Sidebar}} is not being used as a wrapper for Module:Sidebar. When {{Sidebar}} is used as a wrapper, setting |name={{subst:PAGENAME}} is recommended.
|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 |title= (if used). Full wiki syntax is expected (i.e. [[File:...]]).
To add a caption below the image, use |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 |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=
|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= Same as the |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=
  • |headingnstyle=
  • |contentstyle=
  • |contentnstyle=
  • |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).

Обробка довгих посилань

{{Normalwraplink}} може використовуватися для обробки посилань, які повинні обертатися в бічній панелі, або іншим чином їх потрібно робити, щоб запобігти занадто широкій бічній панелі. Використовуйте {{normalwraplink|longlinkname}}, де |longlinkname довга ланка без квадратних дужок.

Використовуйте параметр |wraplinks=true, аби вимкнути завершення посилання для всього шаблону.

Вкладення

Шаблон бічної панелі можна вбудувати в інший за допомогою параметра |child=. Ця функція може бути використана для створення модульної бічної панелі або для створення більш чітко визначених та логічних розділів.

{{Sidebar
| title = Назва верхнього рівня
| content1 =
 {{Sidebar |child=yes
  | title = Перший підрозділ
  | heading1 = Заголовок 1.1
  | content1 = Вміст 1.1
 }}
| content2 =
 {{Sidebar |child=yes
  | title = Другий підрозділ
  | heading1 = Заголовок 2.1
  | content1 = Вміст 2.1
 }}
| below = "нижче" тексту
}}

Зауважте в наведених вище прикладах, що дочірня бічна панель розміщується в полі content, а не в heading. Зауважте також, що підзаголовки розділів не відображаються жирним шрифтом, якщо це прямо не вказано. Щоб отримати заголовки жирних розділів, перемістіть заголовки в поле heading, використовуючи:

{{Sidebar
| title = Назва верхнього рівня
| heading1 = Перший підрозділ
| content1 = 
 {{Sidebar |child=yes
  | heading1 = Заголовок 1.1
  | content1 = Вміст 1.1
 }}
| heading2 = Другий підрозділ
| content2 = 
 {{Sidebar |child=yes
  | heading1 = Заголовок 2.1
  | content1 = Вміст 2.1
 }}
| below = "нижче" тексту
}}

Повний порожній синтаксис

{{Sidebar
| name = {{subst:PAGENAME}}
| class =            <!-- або: | bodyclass = -->
| style =            <!-- або: | bodystyle = -->
| width = 
| cellspacing = 
| cellpadding = 
| wraplinks =        <!-- "true" в іншому випадку (default:) опускається -->

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

<!-- та ін., тощо: -->

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

<!-- (опускаючи heading4/content4 до передостанніх параметрів heading/content) -->

| belowclass = 
| belowstyle = 
| below = 

| navbarstyle =      <!-- або: | tnavbarstyle = -->
| navbarfontstyle =  <!-- або: | tnavbarfontstyle = -->
| navbar =           <!-- або: | tnavbar = --> <!-- "off", "none", та ін. в іншому випадку (default:) опускається -->

}}

Додаткова документація

Додаткова відповідна документація (стосовно {{navbar}} використання на бічній панелі (sidebar)) знаходиться на [[Шаблон::Navbar/документація]].

Категорія відстеження

Див. також