Difference between revisions of "Template:SecTitle"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Protected "Template:SecTitle": Author request to prevent accidental changes to important key templates in the RU infrastructure. ([edit=sysop] (indefinite) [move=sysop] (indefinite)))
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>[[{{{1}}}|{{#lst:{{{1}}}|title}}]]</includeonly><noinclude><!--{{:{{#rel2abs: ./doc}}}}-->{{doc}}
+
<!--
 +
Eng:
 +
"Optimization" by replacing code with SectionLink template call is STRICTLY PROHIBITED!
 +
 
 +
SectionLink directly used to insert link with text from section with unusual section-name. For example, section
 +
title2, with alternative article title. This template using rarely and all articles whith unusial sections could be find in page "Links here": http://wiki.services.openoffice.org/wiki/Special:WhatLinksHere/Template:SectionLink.
 +
If SectionLinks will be using in other templates, this auto monitoring functionality will be lost.
 +
 
 +
Rus:
 +
ЗАПРЕЩЕНО "оптимизировать" этот шаблон, путём подстановки в код вызова шаблона SectionLink!
 +
 
 +
SectionLink используется напрямую для вставки содержимого нестандартных секций. Например, секции title2 для вставки альтернативного заголовка статьи. Этот шаблон используется редко, что позволяет отслеживать список всех статей с нестандартными секциями через механизм "Ссылки сюда": http://wiki.services.openoffice.org/wiki/Special:WhatLinksHere/Template:SectionLink. Если SectionLink будет использоваться в других шаблонах, такая возможность автомониторинга будет утеряна.
 +
 
 +
--><includeonly>[[{{{1}}}|{{#lst:{{{1}}}|title}}]]</includeonly><noinclude>{{CoreCriticalTemplate}}{{doc}}
 
[[Category:RU/wiki templates]]
 
[[Category:RU/wiki templates]]
 
</noinclude>
 
</noinclude>

Latest revision as of 11:09, 16 December 2010

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

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