Шаблон:Modeling/doc — различия между версиями
Korogodin (обсуждение | вклад) (→Content parameters) |
Korogodin (обсуждение | вклад) (→Enhancing this template) |
||
Строка 226: | Строка 226: | ||
− | In addition, [[Template: | + | 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:Extension/Doc]]. |
− | === The Create | + | === The Create Modeling button === |
To improve the create extension button behavior: | To improve the create extension button behavior: | ||
− | * '''[[Template: | + | * '''[[Template:Modeling/Sample]]:''' The boilerplate extension that is preloaded into newly-created pages. |
− | * '''[[Template: | + | * '''[[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 === | === Infobox parameters === | ||
In general: | 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: | + | * 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: | 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. | * Check the [[Template_talk:Extension|talk page]] - there have been some extensive discussions about this field. | ||
− | * '''[[Template: | + | * '''[[Template:Modeling/TypeSwitch]]:''' Stores the possible values for the type field. Multiple values are implemented by calling this template with [[Template:Foreach]]. |
− | * '''[[Template: | + | * '''[[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: | + | * '''[[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: | To change the behavior of the hook parameters: | ||
− | * '''[[Template: | + | * '''[[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: | + | * '''[[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. |
== Test case == | == Test case == |
Версия 17:42, 23 апреля 2011
Содержание[убрать] |
Purpose
This template should be added to the main page of all extensions documented on this wiki (and only the main page). It will add a useful infobox using the information supplied (see below) and will automatically add the extension to Категория:Список всех моделей, plus the appropriate ... and ... categories.
Usage
Cut and paste: {{Modeling|templatemode = |name = |status = |type1 = |type2 = |hook1 = |hook2 = |username = |author = |description = |image = |imagesize = |version = |update = |mediawiki = |php = |license = |download = |readme = |changelog = |parameters = |tags = |rights = |example = |compatibility = }} For help with parameter values, see below. |
|
Content parameters
This section describes parameters that govern infobox content. For help with templatemode and other control parameters, please see Control parameters.
Control parameters
Using the infoboxExisting extension pagesIf you want to add the infobox to an existing page, copy and paste the code at the top of this page. Create a new extension articleIf 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.
Enhancing this templateIf you would like to improve on this template, thanks! This is a complicated template so here is some help along the way: Fixing documentationIf you would like to fix documentation, please be aware that documentation and code is split into two files:
The Create Modeling buttonTo improve the create extension button behavior:
Infobox parametersIn general:
Test caseSee if the following pages are still ok, after edited this template. |