Difference between revisions of "Template:\sandbox/doc"

From Second Life Wiki
Jump to navigation Jump to search
(Shamelessly copied from MediaWiki.org)
 
m (Fixing lack of {{Wikipedia|...}} here and there)
 
Line 4: Line 4:
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata -->
== Usage ==
== Usage ==
Returns "/{{#ifeq:{{NAMESPACE}}:{{str left|{{ROOTPAGENAME}}}}|Template:\|{{str right|{{ROOTPAGENAME}}|1}}|sandbox}}" if the template detects that the page where it is [[Help:Transclusion|transcluded]] is a [[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 {{Wikipedia|Help:Transclusion|transcluded}} is a {{Wikipedia|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>{{((}}''template_name''</code>&nbsp;... on the /doc page with <code>{{((}}''template_name''{{tlf|{{ROOTPAGENAME}}}}</code>&nbsp;...) 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>{{((}}''template_name''</code>&nbsp;... on the /doc page with <code>{{((}}''template_name''{{tlf|{{ROOTPAGENAME}}}}</code>&nbsp;...) when that documentation is transcluded on the template's sandbox page.
Line 13: Line 13:
<includeonly>{{Sandbox other||
<includeonly>{{Sandbox other||
<!-- Categories below this line; interwikis at Wikidata -->
<!-- Categories below this line; interwikis at Wikidata -->
[[Category:Sandbox templates{{#translation:}}]]
[[Category:Sandbox templates<!--{{#translation:}}-->]]
}}</includeonly>
}}</includeonly>

Latest revision as of 04:50, 4 September 2023

Usage

Returns "/

  • \s*
  • \sa*
  • \san*
  • \sand*
  • \sandb*
  • \sandbo*
  • \sandbox*" if the template detects that the page where it is "Wikipedia logo"transcluded is a "Wikipedia logo"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.

See also