Template:SandboxDocumentation: Difference between revisions
Template page
More actions
No edit summary |
sandbox_doc |
||
| (6 intermediate revisions by 2 users not shown) | |||
| Line 2: | Line 2: | ||
|template ={{#if: {{{template|}}} | |template ={{#if: {{{template|}}} | ||
| {{{template|}}} | | {{{template|}}} | ||
| {{#ifeq | | {{#ifeq: {{#titleparts:{{PAGENAME}} | 1 | -1 }} | doc <!-- means 'if ends with /doc' --> | ||
| {{#ifeq | | {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | -2 }} | sandbox<!-- means 'if ends with /sandbox/doc' --> | ||
| {{#titleparts: {{PAGENAME}} | | {{#titleparts: {{PAGENAME}} | -2 }}<!-- PAGENAME without ending /sandbox/doc --> | ||
| {{#titleparts: {{PAGENAME}} | | {{#titleparts: {{PAGENAME}} | -1 }}<!-- PAGENAME without ending /doc --> | ||
}} | }} | ||
| {{#ifeq | | {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | -1 }} | sandbox <!-- means 'if ends with /sandbox' --> | ||
| {{#titleparts: {{PAGENAME}} | | {{#titleparts: {{PAGENAME}} | -1 }}<!-- PAGENAME without ending /sandbox --> | ||
| {{PAGENAME}} | | {{PAGENAME}} | ||
}} | }} | ||
}} | }} | ||
}} | }} | ||
|type={{#ifeq | |template type={{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | -1 }} | sandbox <!-- means 'if ends with /sandbox' --> | ||
| sandbox | | sandbox | ||
| {{#ifeq | | {{#ifeq: {{#titleparts: {{PAGENAME}} | 1 | -2 }} | sandbox <!-- means 'if ends with /sandbox/doc' --> | sandbox_doc }} | ||
}} | }} | ||
|protected={{{protected|}}} | |protected={{{protected|}}} | ||
|domain={{{domain|}}} | |||
}}<noinclude> | }}<noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||
Latest revision as of 19:05, 18 May 2016
Note: if you want to edit this template, first try your modifications on {{SandboxDocumentation/sandbox}}.You can then test your edits in {{SandboxDocumentation/testcases}}.
When the new version is ready, you can move it to the main template.
This documentation is transcluded from Template:SandboxDocumentation/doc.
- This template can be used in a template documentation (/doc page) to describe the process to modify/test the template
- This template can also be used in a template sandbox documentation (/sandbox/doc page)
- Note: it will add Category:Sandbox templates to /sandbox pages
Usage
{{SandboxDocumentation |template= |protected= |domain= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
template | name of the template associated with the sandbox and testcases page. | (computed by the template) | optional | |
protected | set to yes if the template is protected (modifiable only by an administrator) | empty | optional | |
domain | The domain of the template (for example: biology). Category:<domain> sandbox templates must exist. | empty | optional | |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: no user group specified
Relies on:
{{SandboxDocumentation/core}}
Examples
- protected templates:
- unprotected templates: