Template:Testcases notice: Difference between revisions
(Created Template:Testcases notice by copy-pasting from English Wikipedia.) |
(Updated images and links. edited text.) |
||
| Line 3: | Line 3: | ||
| image = <!------ Generic icon (glassware) otherwise purge box, depending whether inline purge-link (see below) indicated ------> | | image = <!------ Generic icon (glassware) otherwise purge box, depending whether inline purge-link (see below) indicated ------> | ||
{{#ifeq:{{{purge link|}}}{{{purgelink|}}}|inline |[[File:Gnome- | {{#ifeq:{{{purge link|}}}{{{purgelink|}}}|inline |[[File:Gnome-app-science.png|42px|alt=|link=]] | ||
| <div class="messagebox" style="font-size:85%;width:5.25em;margin:0 0.6em;line-height:1.15em;text-align:center;"><!-- | | <div class="messagebox" style="font-size:85%;width:5.25em;margin:0 0.6em;line-height:1.15em;text-align:center;"><!-- | ||
(image:)-->[[File:Crystal 128 reload. | (image:)-->[[File:Crystal 128 reload.png|center|32px|link={{fullurl:{{FULLPAGENAME}}|action=purge}}|Update testcases]]<!-- | ||
(text:)--><div style="padding-top:0.25em;">{{purge|'''Update<br/>testcases'''}}</div><!-- | (text:)--><div style="padding-top:0.25em;">{{purge|'''Update<br/>testcases'''}}</div><!-- | ||
--></div> }} | --></div> }} | ||
| text = '''This is the [[ | | text = '''This is the [[MozillaWiki:Template sandbox and test cases|testcases]] page''' for <!-- | ||
--><includeonly><!-- | --><includeonly><!-- | ||
-->{{#ifexist:{{{sandbox link|{{{sandboxlink|../{{{subpage-name|sandbox}}}}}}}}} | -->{{#ifexist:{{{sandbox link|{{{sandboxlink|../{{{subpage-name|sandbox}}}}}}}}} | ||
| Line 20: | Line 20: | ||
-->{{#ifeq:{{{purge link|}}}{{{purgelink|}}}|inline |'''{{purge|Purge this page}}''' to update the testcases. |To update the testcases, click the box to the left of this message.}}<!-- | -->{{#ifeq:{{{purge link|}}}{{{purgelink|}}}|inline |'''{{purge|Purge this page}}''' to update the testcases. |To update the testcases, click the box to the left of this message.}}<!-- | ||
----------- | ----------- More info section ----------- | ||
--><div style="font-size: | --><div style="font-size:80%;"><!-- | ||
--> | -->If there are many examples of a complicated template on this page, those toward the end of <br />the page may malfunction due to MediaWiki limits. | ||
You can also use [[Special:ExpandTemplates]] to examine the results of template use. | You can also use [[Special:ExpandTemplates]] <br />to examine the results of template use.<!-- | ||
--></div> | --></div> | ||
}}<!--(end Ombox) | }}<!--(end Ombox) | ||
Latest revision as of 22:48, 5 November 2014
| This is the testcases page for the sandbox of Template:Testcases notice. To update the testcases, click the box to the left of this message. If there are many examples of a complicated template on this page, those toward the end of the page may malfunction due to MediaWiki limits. You can also use Special:ExpandTemplates to examine the results of template use. |
{{Testcases notice}} is meant to be placed at the top of a /testcases page, i.e. a page where a test version (a "sandbox" version) of (usually) a template and its parameters is tested and (usually) compared with the version currently in use (the "main" version). For further information about template sandboxes and testcase pages, see Wikipedia:Template sandbox and test cases.
Usage
{{Testcases notice}}, i.e. the template without any parameters, produces the notice as formatted above.
Purge box / link
To replace the "purge box" beside the notice's text with a purge link in the text, include the parameter |purgelink=inline.
{{Testcases notice |purgelink=inline}}, for instance, produces:
|
|
This is the testcases page for Template:Testcases notice. to update the testcases. If there are many examples of a complicated template on this page, those toward the end of the page may malfunction due to MediaWiki limits. You can also use Special:ExpandTemplates to examine the results of template use. |
Table of Contents
To include a Table of Contents (ToC), set the parameter toc (e.g. |toc=on). If a limit to the ToC's depth is desired, toc can be set as that limit (usually a number between 1 and 4 or 5, e.g. |toc=3) or, alternatively, set toclimit as the limit (e.g. |toclimit=2) and omit toc.
{{Testcases notice |toc=on}}, for instance, produces:
| This is the testcases page for Template:Testcases notice. To update the testcases, click the box to the left of this message. If there are many examples of a complicated template on this page, those toward the end of the page may malfunction due to MediaWiki limits. You can also use Special:ExpandTemplates to examine the results of template use. |
To prevent it pushing the start of a page's content (testcases) further downwards, the ToC is set to float over or beyond
the (empty) righthand end of the notice box.
Other parameters
You may specify the link to the associated sandbox page using the parameter sandboxlink:
{{Testcases notice |sandboxlink=../[alternate sandbox name here]}}
You may also specify that some other text is substituted for the word "sandbox" shown in the template using the parameter sandboxname:
{{Testcases notice |sandboxlink=../[alternate sandbox name here] |sandboxname=[alternate to "sandbox" here]}}
{{Testcases notice
| [template name]
| purgelink =
| sandboxlink =
| sandboxname =
| category =
| style =
}}
- {{{1}}} (i.e. first unnamed parameter)
- Full name of the template being tested on the page, including the "Template:" prefix. If omitted, the default is the base page of the test cases page. Be careful not to use any leading or trailing spaces with this parameter, as they will affect the display of the template link.
- sandboxlink (or sandbox link)
- The page that the sandbox link in the message targets. Can be an absolute page name, or relative to the test cases page. The default is "../sandbox".
- sandboxname (or sandbox name)
- The text shown for the sandbox link. The default is "sandbox".
- category
- Category and sort key to use for the test cases page instead of the default of
[[Category:Template test cases|{{PAGENAME}}]]. When using this parameter, the double square brackets and "Category:" prefix are required. To suppress the category, use|category(i.e. category without any value). - style
- Use if/when there is a need to override the margin/padding-top:0 settings applied to the message box carrying the notice (or to apply other CSS styling to it).
subpage-name- (deprecated) Sets the sandboxlink and sandboxname parameters at the same time. The value is prefixed with "../" for the sandbox link, so must be a page name relative to the base page. For example,
subpage-name=sandbox3impliessandboxlink=../sandbox3 |sandboxname=sandbox3.
See also
- {{Documentation}}, for use at the bottom of templates and their /sandbox pages.
- {{Template sandbox notice}}, for use at the bottom of /sandbox pages if {{Documentation}} is not used.
| The above documentation is transcluded from Template:Testcases notice/doc. (edit | history) Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |