Difference between revisions of "Template:\sandbox/doc"
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 | 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> ... on the /doc page with <code>{{((}}''template_name''{{tlf|{{ROOTPAGENAME}}}}</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>{{((}}''template_name''</code> ... on the /doc page with <code>{{((}}''template_name''{{tlf|{{ROOTPAGENAME}}}}</code> ...) 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
![]() |
This page is not a ![]() It should not be used for test editing. To experiment, please use the ![]() ![]() |
![]() |
This is a ![]() ![]() It contains usage information, ![]() |
Usage
Returns "/
- \s*
- \sa*
- \san*
- \sand*
- \sandb*
- \sandbo*
- \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.