|
|
(не показаны 6 промежуточных версий 1 участника) |
Строка 110: |
Строка 110: |
| | <span id="repository">'''repository'''</span>|| Ссылка на репозиторий | | | <span id="repository">'''repository'''</span>|| Ссылка на репозиторий |
| |- | | |- |
− | | <span id="category">category</span> || Категории, к которым можно отнести модель. Например, <code>Коррелятор</code>. | + | | <span id="category">category</span> || Дополнительные категории, к которым можно отнести модель. Например, <code>Коррелятор</code>. Категории [[:Category:Моделирование|Моделирование]] и [[:Category:Список всех моделей|Список всех моделей]] добавляются автоматически. |
| |} | | |} |
| | | |
− | == Control parameters == | + | == Управляющие параметры == |
− | {| border="1" | + | {| class="wikitable" |
− | |+ '''Control parameters''' | + | |+ '''Управляющие параметры''' |
| |- | | |- |
− | | '''templatemode''' || '''Controls auto-categorization of host page.''' | + | | '''templatemode''' || при значении параметра ''nocats'' страница не добавляется в категории [[:Category:Моделирование|Моделирование]] и [[:Category:Список всех моделей|Список всех моделей]] и категории, указанные в параметрах category. По умолчанию следует оставлять пустым. |
− | | + | |
− | Normally left blank. Alternate values are:
| + | |
− | * ''nocats'' - suppresses categorization. Use this value if you are adding this template to [[Help:Subpage|subpages]] of an extension or to how-to documentation of extensions. For example, the usage image above sets <code>templatemode=nocats</code> because this isn't an actual extension page and we don't want to add this page to any categories on account of it.
| + | |
− | | + | |
− | | + | |
− | If this is left blank, this template will add the host page to [[:Category:All extensions]] and to one or more additional categories, depending on the values assigned to the [[#Content parameters|Content parameters]].
| + | |
| |} | | |} |
| | | |
− | == Using the infobox == | + | == Создание описания модели с помощью шаблона == |
− | === Existing extension pages ===
| + | |
− | If you want to add the infobox to an existing page, copy and paste the code at the [[#CutAndPaste|top of this page]].
| + | |
− | | + | |
− | === Create a new extension article ===
| + | |
− | If you want to create a new extension page, enter the name below and click the button. A new page will be created with the infobox template already in place.
| + | |
− | | + | |
| | | |
| + | С помощью шаблона <nowiki>{{Modeling/CreateExtensionInputBox}}</nowiki> можно создавать новые статьи-описания для моделей: |
| {{Modeling/CreateExtensionInputBox}} | | {{Modeling/CreateExtensionInputBox}} |
− |
| |
− |
| |
− | == Enhancing this template ==
| |
− | If you would like to improve on this template, thanks! This is a complicated template so here is some help along the way:
| |
− |
| |
− | === Fixing documentation ===
| |
− | If you would like to fix documentation, please be aware that documentation and code is split into two files:
| |
− | * '''[[Template:Modeling/doc]]''' - stores all documentation.
| |
− | * '''[[Template:Modeling]]''' - stores only the code for the template and a small amount of non-included material (category links, transcluded documentation link).
| |
− |
| |
− |
| |
− | In addition, [[Template:Modeling/Sample]] stores the boiler plate that is preloaded into newly created pages and contains some basic documentation on how to fill in the template parameters. It needs to be kept in sync with [[Template:Modeling/doc]].
| |
− |
| |
− | === The Create Modeling button ===
| |
− | To improve the create extension button behavior:
| |
− | * '''[[Template:Modeling/Sample]]:''' The boilerplate extension that is preloaded into newly-created pages.
| |
− | * '''[[Template:Modeling/CreateExtensionInputBox]]:''' An input box that can be inserted wherever you want users to easily create extensions. For documentation on the <code><nowiki><inputbox></nowiki></code> tag, please see [[Extension:InputBox]].
| |
− |
| |
− |
| |
− | === Infobox parameters ===
| |
− | In general:
| |
− | * To make this template easy to use, each label in the infobox is linked to documentation on the template parameter(s) it displays. If you add a parameter, please be sure to also add it to the [[Template:Modeling/Doc#Content parameters|content parameter documentation]] and link its label to that documentation.
| |
− |
| |
− |
| |
− | To change/correct/add to the implementation type parameters:
| |
− | * Check the [[Template_talk:Extension|talk page]] - there have been some extensive discussions about this field.
| |
− | * '''[[Template:Modeling/TypeSwitch]]:''' Stores the possible values for the type field. Multiple values are implemented by calling this template with [[Template:Foreach]].
| |
− | * '''[[Template:Modeling/TypeSwitchNoCats]]:''' Used instead of [[Template:Modeling/TypeSwitch]] when this template is used in <code>templatemode=nocats</code>. Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Modeling/TypeSwitch]] with another template that sets the mode.
| |
− | * '''[[Template:Modeling/doc]]:''' Documentation for this template needs to be kept in sync with any changes to the implementation type taxonomy.
| |
− |
| |
− |
| |
− | To change the behavior of the hook parameters:
| |
− | * '''[[Template:Modeling/HookInUse]]:''' Adds links and categories for a hook in use. Multiple hooks in use are implemented by calling this template with [[Template:Foreach]].
| |
− | * '''[[Template:Modeling/HookInUseNoCats]]:''' Used instead of [[Template:Modeling/HookInUse]] when this template is used in <code>templatemode=nocats</code>. Templates used with [[Template:Foreach]] can only take one parameter so we need to wrap the call to [[Template:Modeling/HookInUse]] with another template that sets the mode.
| |
Этот шаблон должен добавляться на каждую страницу, описывающую ту или иную компьютерную модель. Он добавляет полезный инфобокс с общим описанием модели и автоматически добавляет страницу в категории Моделирование и Список всех моделей. Дополнительные категории можно указать с помощью набора параметров category.
В данном разделе описаны параметры, задающие содержимое инфобокса. Информация по параметру templatemode и другим управляющим параметрам приведена в разделе Управляющие параметры.