Difference between revisions of "Template:SecTitle/doc"

From Apache OpenOffice Wiki
Jump to: navigation, search
(+ ParentTemplate, SubsidiariesTemplates)
 
Line 28: Line 28:
 
{{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 53: Line 53:
  
 
<pre>[[RU/kb/page1|Страница 1]]</pre>
 
<pre>[[RU/kb/page1|Страница 1]]</pre>
|l2={{Documentation/Caution|To use a template requires pre-prepared pages.}}
+
|l2={{Warn|To use a template requires pre-prepared pages.}}
  
 
Example:
 
Example:

Latest revision as of 08:02, 14 July 2018

РУС ENG
'

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

SecTitle = Section title SecTitle = Section title
Данный шаблон предназначен для вставки ссылок с текстом на национальных языках (для случаев, когда название страницы не совпадает с его локализованныем названием). Это сравнительно простой способ частично обойти ограничения тэга {{DISPLAYTITLE}}, содержимое которого, на данный момент, невозможно получить с других страниц. Однако, ничто не мешает вставить всё содержимое любой страницы или только его часть. Какая именно часть страницы будет экспортироваться, настраивается парными тэгами <section begin=имя_секции /> и <section end=имя_секции />. Экспортируемая часть располагается между ними. В том числе, можно отсечь для экспорта текст внутри {{DISPLAYTITLE}}.


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

This template is designed to insert a link to the text of the national languages (for cases where the page name does not coincide with his lokalizovannyem name). This is a relatively simple way to partially circumvent the restrictions on the tag {{DISPLAYTITLE}}, the contents of which, at present, impossible to obtain from other pages. However, nothing prevents the paste all the contents of any page or only part of it. Which part of the page will be exported, adjusted a pair of tags <section begin=section_name /> and <section end=section_name />. Exported portion located between them. Including, you can cut to export the text within the {{DISPLAYTITLE}}.


Unfortunately, this method does not allow to display the localized name of a category page but it is possible to use a template DPL, allows you to embed specific section of the document. But the formation of links manually, this method allows to avoid duplication of localized names on other pages and avoid fan edits, in the case of renaming the page.


'

Параметры    —    Parameters

Используется один параметр
  1. - обязательный - URL страницы.
Use one parameter
  1. - Mandatory - URL page.


'

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

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

Например:

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

Локализованное название "Страница 1".

Структуру страницы нужно привести к следующему виду:


<section begin=title /><noinclude>
{{DISPLAYTITLE:База Знаний: </noinclude>Страница 1<noinclude>}}
</noinclude><section end=title />
Основной текст страницы

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

{{SecTitle|RU/kb/page1}}

Результат:

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

Example:

There is a page RU/kb/page1.

Localised name of "Page 1 ".

The structure of the page should lead to the following form:


<section begin=title /><noinclude>
{{DISPLAYTITLE:Knowledge base: </noinclude>Page 1<noinclude>}}
</noinclude><section end=title />
Main page text

Embed page:

{{SecTitle|RU/kb/page1}}

Result:

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


'

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

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


'

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

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


'

Пример    —    Example

Шаблон    —    template Результат    —    result
{{SecTitle|RU/kb/page1}} [[RU/kb/page1|Страница 1]]
Personal tools