Difference between revisions of "Template:SectionLink/doc"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Основной текст)
 
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
<noinclude>{{docpage}}</noinclude><!--
 
<noinclude>{{docpage}}</noinclude><!--
-->__NOTOC__{{Doc/doc/code/tbl/begin}}
+
-->__NOTOC__{{Doc/doc/code/tbl/begin
 +
|l1=РУС
 +
}}
 
{{Doc/doc/code/tbl/titleMission}}
 
{{Doc/doc/code/tbl/titleMission}}
 
{{Doc/doc/code/tbl/strL10n
 
{{Doc/doc/code/tbl/strL10n
|l1=Данный шаблон предназначен для вставки вставки в текст ссылки, именем которой является фрагментов страницы, на которую даётся ссылка. Вставляемый текст берётся из поименованной категории страницы, на которую даётся ссылка. Эта страница предварительно должна быть подготовлена обрамлением секции парными тэгами {{Tag|<nowiki>section begin=имя_секции /</nowiki>|1}} и {{Tag|<nowiki>section end=имя_секции /</nowiki>|1}}. Экспортируемая часть располагается между ними.
+
|l1={{Warn|Для использования шаблона требуются предварительно подготовленные страницы.}}
|l2=
+
 
 +
Данный шаблон предназначен для формирование локализованной ссылки на страницу с содержанием именованной секции этой страницы, в качестве текста ссылки. Рекомендуется использовать его для генерации ссылок с текстом из нестандартных, редко используемых секций. Например, '''"title2"'''.
 +
 
 +
{{Warn|Для вставки ссылок c текстом из секции '''"title"''' используйте специализированный шаблон {{Tl|SecTitle}}.}}
 +
 
 +
Текст ссылки обрамляется парными тэгами секции: {{Tag|<nowiki>section begin=имя_секции /</nowiki>|1}} и {{Tag|<nowiki>section end=имя_секции /</nowiki>|1}}.
 +
|l2={{Warn|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"'''.
 +
 
 +
{{Warn|To insert links c text of the section '''"title"''', use a specialized template {{Tl|SecTitle}}.}}
 +
 
 +
The link text is flanked by paired tags section: {{Tag|<nowiki>section begin=section_name /</nowiki>|1}} и {{Tag|<nowiki>section end=section_name /</nowiki>|1}}.
 
}}
 
}}
 
{{Doc/doc/code/tbl/titleParameters}}
 
{{Doc/doc/code/tbl/titleParameters}}
Line 17: Line 31:
 
{{Doc/doc/code/tbl/titleOperationManual}}
 
{{Doc/doc/code/tbl/titleOperationManual}}
 
{{Doc/doc/code/tbl/strL10n
 
{{Doc/doc/code/tbl/strL10n
|l1={{Documentation/Caution|Для использования шаблона требуются предварительно подготовленные страницы.}}
+
|l1={{Warn|Для использования шаблона требуются предварительно подготовленные страницы.}}
  
 
Например:
 
Например:
Line 23: Line 37:
 
Есть страница RU/kb/page1.  
 
Есть страница RU/kb/page1.  
  
Локализованное название '''"Страница 1"'''.  
+
Локализованное название (секция title):  '''"Страница 1"'''.
 +
Альтернативное название (секция title2): '''"Страница 2"'''.
  
Структуру страницы нужно привести к следующему виду:
+
Добавляем секцию title2:
  
 
----
 
----
  
<pre><section begin=toc />
+
<pre><section begin=title2 />Страница 2<section end=title2 /></pre>
... Текст секции ...
+
<section end=toc /></pre>
+
  
 
----
 
----
  
 
Код для вставки на страницу:
 
Код для вставки на страницу:
<pre>{{SectionLink|RU/kb/page1|toc}}</pre>
+
<pre>{{SectionLink|RU/kb/page1|title2}}</pre>
  
 
Результат:
 
Результат:
 +
<pre>[[RU/kb/page1|Страница 2]]</pre>
  
<pre>[[RU/kb/page1|... Текст секции ...]]</pre>
+
|l2={{Warn|To use a template requires pre-prepared pages.}}
|l2={{Documentation/Caution|To use a template requires pre-prepared pages.}}
+
  
 
Example:
 
Example:
Line 47: Line 60:
 
There is a page RU/kb/page1.
 
There is a page RU/kb/page1.
  
Localised name of '''"Page 1 "'''.
+
Localised name (section title) is '''"Page 1 "'''.
 +
Alternative name (section title2) is '''"Page 2 "'''.
  
The structure of the page should lead to the following form:
+
Add title2 section in RU/kb/page1:
 
----
 
----
  
<pre><section begin=toc />
+
<pre><section begin=title2 />Page 2<section end=title2 /></pre>
... Текст секции ...
+
<section end=toc /></pre>
+
  
 
----
 
----
  
 
Embed page:
 
Embed page:
<pre>{{SectionLink|RU/kb/page1|toc}}</pre>
+
<pre>{{SectionLink|RU/kb/page1|title2}}</pre>
  
 
Result:
 
Result:
<pre>[[RU/kb/page1|... Текст секции ...]]</pre>
+
<pre>[[RU/kb/page1|Page 2]]</pre>
 +
}}
 +
{{Doc/doc/code/tbl/titleParentTemplate}}
 +
{{Doc/doc/code/tbl/strL10n
 +
|l1=<Перечень родительских шаблонов / List of parenting templates>
 +
|l2=<List of parenting templates>
 +
}}
 +
{{Doc/doc/code/tbl/titleSubsidiariesTemplates}}
 +
{{Doc/doc/code/tbl/strL10n
 +
|l1=<Перечень дочерних шаблонов / List of subsidiaries templates>
 +
|l2=<List of subsidiaries templates>
 
}}
 
}}
 
{{Doc/doc/code/tbl/titleExample}}
 
{{Doc/doc/code/tbl/titleExample}}
|-
+
{{Doc/doc/code/tbl/exampleBegin}}
| colspan="2" |
+
{{Doc/doc/code/tbl/exampleStrL10n
{| class="prettytable" style="width:100%"
+
  |examp1=<nowiki>{{SectionLink|RU/kb/90000023|title2}}</nowiki>
|-
+
  |examp2={{SectionLink|RU/kb/90000023|title2}}
!Шаблон{{Doc/doc/code/tbl/titleSeparator}}template
+
}}
!Результат{{Doc/doc/code/tbl/titleSeparator}}result
+
{{Doc/doc/code/tbl/exampleEnd}}
  |-
+
|
+
|
+
  |}
+
 
{{Doc/doc/code/tbl/end}}
 
{{Doc/doc/code/tbl/end}}
 
<noinclude>
 
<noinclude>
 
[[Category:RU/wiki_templates]]
 
[[Category:RU/wiki_templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 08:14, 14 July 2018

РУС 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/90000023|title2}} [[RU/kb/90000023|]]
Personal tools