Template:SectionLink

From Wiki
Jump to navigationJump to search

CoreCriticalTemplate.png  Критически важный опорный шаблон    —    Core Critical Template.  

Необдуманное вмешательство в шаблон может повлечь за собой разрушение всего проекта! Unconsidered intervention in the template may result in the destruction of the entire project!
Документация Документация    —    Documentation
РУС ENG
'

Предназначение    —    Mission

Documentation caution.png Для использования шаблона требуются предварительно подготовленные страницы.

Данный шаблон предназначен для формирование локализованной ссылки на страницу с содержанием именованной секции этой страницы, в качестве текста ссылки. Рекомендуется использовать его для генерации ссылок с текстом из нестандартных, редко используемых секций. Например, "title2".

Documentation caution.png Для вставки ссылок c текстом из секции "title" используйте специализированный шаблон {{SecTitle}}.

Текст ссылки обрамляется парными тэгами секции: <section begin=имя_секции /> и <section end=имя_секции />.

Documentation caution.png To use a template requires pre-prepared pages.

This template is intended for the formation of localized links to a page with the contents of a named of section of this page as the link text. It is recommended to use it to generate links with the text of the unusual, seldom-used sections. For example, "title2".

Documentation caution.png To insert links c text of the section "title", use a specialized template {{SecTitle}}.

The link text is flanked by paired tags section: <section begin=section_name /> и <section end=section_name />.


'

Параметры    —    Parameters

Используется два обязательных параметра
  1. - URL страницы;
  2. - имя секции.
Use 2 parameter
  1. - URL page;
  2. - Section name.


'

Инструкция по использованию    —    Operation manual

Documentation caution.png Для использования шаблона требуются предварительно подготовленные страницы.

Например:

Есть страница RU/kb/page1.

Локализованное название (секция title): "Страница 1". Альтернативное название (секция title2): "Страница 2".

Добавляем секцию title2:


<section begin=title2 />Страница 2<section end=title2 />

Код для вставки на страницу:

{{SectionLink|RU/kb/page1|title2}}

Результат:

[[RU/kb/page1|Страница 2]]
Documentation caution.png To use a template requires pre-prepared pages.

Example:

There is a page RU/kb/page1.

Localised name (section title) is "Page 1 ". Alternative name (section title2) is "Page 2 ".

Add title2 section in RU/kb/page1:


<section begin=title2 />Page 2<section end=title2 />

Embed page:

{{SectionLink|RU/kb/page1|title2}}

Result:

[[RU/kb/page1|Page 2]]


'

Шаблон основан на следующих шаблонах    —    Parent templates

<Перечень родительских шаблонов / List of parenting templates> <List of parenting templates>


'

Дочерние шаблоны    —    Subsidiaries templates

<Перечень дочерних шаблонов / List of subsidiaries templates> <List of subsidiaries templates>


'

Пример    —    Example

Шаблон    —    template Результат    —    result
{{SectionLink|RU/kb/00000423|title2}} [[RU/kb/00000423|]]