Шаблон:Sidebar

![]() |
Цей шаблон використовується на 5300+ сторінках. Для уникнення великомасштабних збоїв та непотрібного навантаження на сервер, будь-які зміни цього шаблону спочатку потрібно перевірити на його підсторінках /пісочниці та /тестів, або у вашому особистому просторі. Потім перевірені зміни можуть бути впроваджені на цій сторінці єдиним редагуванням. Будь ласка, обговорюйте будь-які зміни на сторінці обговорення перед їх впровадженням. |
![]() | Цей шаблон не відображається в мобільному вікні Вікіпедії; лише на стільниці. Прочитайте документацію для пояснення. |
![]() | Використовується Lua: |
Цей шаблон є меташаблоном для створення шаблонів бічної панелі, тобто box'и, які вертикально[en] вирівняними шаблонами навігації. Бічні панелі (sidebar'и), як і інфобокси[en], зазвичай розміщуються в правій частині сторінки.
{{Sidebar with collapsible lists}} — це версія {{Sidebar}}, яка додає збірність до своїх розділів, тобто засоби показу або приховування розділів, натискаючи посилання біля їх заголовків.
Navbox'и та інші шаблони, що використовують атрибути navbox
або вертикальні navbox'и
, не відображаються на мобільному вебсайті Вікіпедії, що становить приблизно 55% читачів.
Використання
{{{pretitle}}} |
{{{title}}} |
---|
{{{image}}} |
{{{above}}} |
{{{heading1}}} |
{{{content1}}} |
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
…… etc …… |
{{{heading35}}} |
{{{content35}}} |
{{{below}}} |
(параметри при нечастому використанні опущені):
{{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 V · T · 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}}.
|
|
Microformat classes for the corresponding parameters. |
|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).) |
|
Use to alter the default CSS styling for the corresponding parameters. |
|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 (V · T · 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 = "нижче" тексту }}
Повний порожній синтаксис
{{{topimage}}} |
{{{pretitle}}} |
{{{title}}} |
---|
{{{image}}} {{{caption}}} |
{{{above}}} |
{{{heading1}}} |
{{{content1}}} |
{{{heading2}}} |
{{{content2}}} |
{{{heading3}}} |
{{{content3}}} |
…… etc …… |
{{{heading35}}} |
{{{content35}}} |
{{{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/документація]].
Категорія відстеження
Див. також
- {{Sidebar with collapsible lists}}
- {{Картка}}
Документація вище включена з Шаблон:Sidebar/документація. (ред. | історія) Дописувачі можуть експериментувати на підсторінках пісочниця (створити | дзеркало) та тести (створити) цього шаблону. Будь ласка, додавайте категорії до підсторінки /документація. Підсторінки цього шаблону. |