Template:Doc/doc

From Wiki
< Template:Doc
Revision as of 13:32, 3 September 2010 by Sancho (talk | contribs) (Восстановление шаблона)
Jump to navigationJump to search
ENG
'

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

Включает подстраницу с документаций для текущего шаблона. Точнее, включает шаблон название страницы/doc. Работает также и в обсуждении шаблона, то есть включает одну и ту же страницу как из шаблона, так и из его обсуждения. И всё же включение документации в обсуждение является нежелательным. Includes sub with the documentation for the current template. Specifically, the template includes the page title/doc. Works well in the discussion template that is comprised of one and the same page as a template, and from its discussion. Yet the inclusion of documentation in the discussion is undesirable.


'

Параметры    —    Parameters

Шаблон поддерживает необязательный параметр. При вводе {{doc|Полное название страницы}} вместо страницы /doc будет включена любая необходимая. Это удобно для создания общей документации для однотипных шаблонов. Template supports an optional parameter. If you enter {{doc|Full page name}} instead of the page /doc will be included either a necessary one. This is useful for creating a common document for similar patterns.


'

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

Проще всего вставить вызов этого шаблона, а потом перейти по появившейся ссылке и создать или скопировать туда документацию. Достаточно добавить код <noinclude>{{doc}}</noinclude>. The easiest way to insert a call to this template, and then click on a link and create or copy the documents. Simply add the code <noinclude>{{doc}}</noinclude>.
Документация шаблона {{doc}} сформирована по тому же принципу, так что можно посмотреть код. Documentation template {{doc}} is formed on the same principle, so that you can see the code.
Основная цель выноса документации на отдельную страницу — избежать перегенерации HTML для всех страниц, использующих шаблон, при редактировании его документации. Также это сокращает страницу самого шаблона, что делает редактирование проще. The main purpose of removal of documentation on a separate page - to avoid regeneration HTML for all pages using the template, when editing its documentation. Also, it reduces the page template itself, which makes editing easier.


'

Пример    —    Example

Шаблон Результат
<nowiki>{{doc}}</nowiki>