Template:Documentation metatemplate/doc

is a meta-model for creating template of documentation displaying a green box (like the one containing the text you are currently reading).

Operation
This template is based on the Documentation module. The display consists of a title displayed at the top, the documentation itself, and a notice displayed at the bottom.

The content of the documentation is generated from different sources:
 * The content of the documentation is obtained from the  subpage, unless the   parameter is specified. It is then its value that is used.
 * The  parameter is used to target a documentation page other than the   sub-page, for example to share a page between several templates.
 * It is possible to define an automatic content for the documentation, which will be displayed on all pages using the template, by using the parameters  and  . Their value will then be displayed respectively above and below the content, whether it comes from the documentation subpage or from the   parameter.

Different banners are displayed depending on the context:
 * If the template is protected, a banner describing the protection is displayed. The  parameter allows you to modify the title of this message. A title icon is also placed at the top of the page.
 * When the template is a sandbox, it automatically adds the Sandbox subpage template to the top of the page.
 * In the absence of content for the documentation, that is to say when there is no documentation sub-page or value provided  parameter, a banner encouraging the creation of this is displayed, and the model is placed in the . If the   or   parameters are filled in and already play this role, it is possible to provide the   parameter (with any value) to prevent the banner from being displayed. This banner is not displayed if the template does not allow content to be defined (use of the   parameter.)

Finally, links are also generated automatically:
 * If there is no documentation content, a [create] link is displayed, which allows you to start the creation of the page by preloading the basic documentation page format.
 * Links available at the bottom of the manual also allow you to create the /sandbox and /testcases.

When to use this metatemplate?
To document a single template, it is better to directly use the Documentation model associated with a documentation subpage. When a handful of models need to use common documentation, the easiest way is to create a documentation page, and reference it on all of those models using the  parameter of the template Documentation.

It becomes useful to have a specific documentation template when many templates must have the same documentation, or when several models must use the same documentation but the documentation contains parameters specific to each template. In this case, a specific documentation template must be created using the Documetation metatemplate page.

How to use this metatemplate
When the use of a specific documentation model is necessary, it is then necessary to create a template using the Documetation metatemplate page. In this case, this template must include the following content:
 * Fill in the  parameter to automatically generate the template record.
 * Optionally, fill in the  parameter, which provides the value of the title to indicate at the head of the documentation template. By default, the title displays Documentation.
 * Fill in the parameters and/or, which must contain the text to be automatically displayed in the documentation.
 * If additional content should be able to be added to the template:
 * Add the parameter  to allow adding content between   and  . Without this parameter, the content of the documentation subpage will be displayed automatically.
 * Optionally, add the parameter  if the documentation is complete without having to fill in a   parameter or a documentation sub-page, which are then optional.
 * If, on the contrary, you do not want to allow the definition of additional content, you must add the parameter.
 * Finally, we can add the parameters and/or  to allow you to customize these elements (see the list of parameters below for details of their behavior).

Parameters
You have to differentiate between meta-parameters, intended to be used directly by templates that use this metatemplate, and parameters, which are intended for end use and that models can simply pass.

List of parameters
These parameters can be passed by templates that use this metatemplate, for use in the final inclusion.
 * content: Raw content to display in the documentation. Replaces the content displayed from the subpage if it exists.
 * doc page: Indicates the documentation page to load if it is different from the  subpage. Allows you to share a documentation subpage between several models.
 * message protection: Customizes the title of the protection strip if the template is protected.

List of meta-parameters
These settings are intended only for documentation models that use this metatemplate. They should not be passed on for final use.
 * template name: To be filled in with the name of the documentation template (without the prefix ). Used to display a link to it in the record.
 * title: Used to customize the title of the documentation template. In its absence, the title is simply  'Documentation' .
 * auto top content: Add content above documentation content.
 * auto low content Add content below the documentation content.
 * no additional content: If specified, the template will not allow adding additional content to the text it defines. Any documentation subpage will be ignored.
 * optional content: Indicates that the presence of documentation content is not mandatory to avoid the display of the banner. Only fill in if the parameter or the   parameter already fulfill this role.

Templatedata
{	"params": { "content": { "description": "Modifies the title of the added banner when the page is in full protection.", "type": "string" },		"page doc": { "description": "Specifies the content of the documentation, so that it is directly included in the body of the template. Do not use if you want to create a subpage.", "type": "string" },		"message protection": { "description": "Modifies the title of the added banner when the page is in full protection.", "type": "string" },		"title": { "description": "Meta-parameter:modifies the title of the documentation.", "type": "string" },		"low auto content": { "description": "Meta-parameter:adds static content below the content.", "type": "string" },		"no additional content": { "description": "Fill in any value to indicate that the template should not allow adding content to the text it defines.", "type": "string" },		"optional content": { "description": "Fill in any value to indicate that the presence of documentation content is not mandatory. Only fill in if the auto high content parameter or the auto low content parameter already fulfill this role.", "type": "string" }	},	"format": "inline", "description": "This template is a metatemplate for creating documentation templates." }