Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:\sandbox/doc: Difference between revisions

Template page
Create documentation subpage for {{\sandbox}}
 
Add support for {{\s}}
 
Line 2: Line 2:
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata -->
{{TemplateBox
{{TemplateBox
| name = \sandbox
| name = {{ROOTPAGENAME}}
| desc-en =
| desc-en =
Returns "/sandbox" if the template detects that the page where it is [[mw:Special:MyLanguage/Help:Transclusion|transcluded]] is a [[mw:Special:MyLanguage/Help:Subpages|subpage]] named "sandbox" (i.e. a sandbox page); otherwise it returns nothing.
Returns "/{{#ifeq:{{NAMESPACE}}:{{str left|{{ROOTPAGENAME}}}}|Template:\|{{str right|{{ROOTPAGENAME}}|1}}|sandbox}}" if the template detects that the page where it is [[mw:Special:MyLanguage/Help:Transclusion|transcluded]] is a [[mw:Special:MyLanguage/Help:Subpages|subpage]] named "sandbox" (i.e. a sandbox page); otherwise it returns nothing.


This can be useful to e.g. switch the version of a template used in its /doc[umentation] to the version in its sandbox (by replacing <code>{{((}}{{var|template_name}}&nbsp;...</code> on the /doc page with <code>{{((}}{{var|template_name}}{{tld|\sandbox}}&nbsp;...</code>) when that documentation is transcluded on the template's sandbox page.
This can be useful to e.g. switch the version of a template used in its /doc[umentation] to the version in its sandbox (by replacing <code>{{((}}{{var|template_name}}&nbsp;...</code> on the /doc page with <code>{{((}}{{var|template_name}}{{tlf|{{ROOTPAGENAME}}}}&nbsp;...</code>) when that documentation is transcluded on the template's sandbox page.


| namespace = Template
| namespace = Template
| usergroup = all
| usergroup = all
| seealso =
* {{tld|\sandbox}}
* {{tld|\s}}


| i18n-method = -
| i18n-method = -

Latest revision as of 12:54, 3 September 2021

Returns "/sandbox" if the template detects that the page where it is transcluded is a subpage named "sandbox" (i.e. a sandbox page); otherwise it returns nothing.

This can be useful to e.g. switch the version of a template used in its /doc[umentation] to the version in its sandbox (by replacing {{template_name ... on the /doc page with {{template_name{{\sandbox}} ...) when that documentation is transcluded on the template's sandbox page.

Usage

{{\sandbox}}

The template takes no parameters.

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: all users

See also

  • {{\sandbox}}
  • {{\s}}

Localization

This template is not intended to be localized.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.