Changes
Jump to navigation
Jump to search
m
no edit summary
{{Documentation subpage}}
{{Template shortcut |\sandbox}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
: {{tc|When in sandbox (|''return this, otherwise'') ''return'' "/sandbox" (|''else return this'')}}
Returns "/sandbox" – or, if supplied, the first unnamed parameter ("''return this''" above) – if the template detects that the page where it is [[Wikipedia:Transclusion|transcluded]] is a [[Wikipedia:Subpages|subpage]] named "sandbox" (i.e. a [[Wikipedia:About the Sandbox|sandbox page]]); otherwise it returns nothing{{spndash}}or, if supplied, the second unnamed parameter ("''else return this''" above). It corresponds to <code style="border:none"><nowiki>{{When pagename is |/sandbox={{{</nowiki>''return this''<nowiki>|/sandbox}}} |other={{{</nowiki>''else return this''<nowiki>|}}}}}</nowiki></code>.
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 {{mono|{{((}}''template_name''}} ... on the /doc page with {{mono|{{((}}''template_name''<nowiki>{{\sandbox}}</nowiki>}} ...) when that documentation is [[Wikipedia:Transclusion|transcluded]] on the template's sandbox page.
<includeonly>{{basepage subpage
| <!--Categories below this line, please; interwikis at Wikidata-->
[[Category:If-then-else templates]]
[[Category:Sandbox templates]]
}}</includeonly>
{{Template shortcut |\sandbox}}
<!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])-->
: {{tc|When in sandbox (|''return this, otherwise'') ''return'' "/sandbox" (|''else return this'')}}
Returns "/sandbox" – or, if supplied, the first unnamed parameter ("''return this''" above) – if the template detects that the page where it is [[Wikipedia:Transclusion|transcluded]] is a [[Wikipedia:Subpages|subpage]] named "sandbox" (i.e. a [[Wikipedia:About the Sandbox|sandbox page]]); otherwise it returns nothing{{spndash}}or, if supplied, the second unnamed parameter ("''else return this''" above). It corresponds to <code style="border:none"><nowiki>{{When pagename is |/sandbox={{{</nowiki>''return this''<nowiki>|/sandbox}}} |other={{{</nowiki>''else return this''<nowiki>|}}}}}</nowiki></code>.
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 {{mono|{{((}}''template_name''}} ... on the /doc page with {{mono|{{((}}''template_name''<nowiki>{{\sandbox}}</nowiki>}} ...) when that documentation is [[Wikipedia:Transclusion|transcluded]] on the template's sandbox page.
<includeonly>{{basepage subpage
| <!--Categories below this line, please; interwikis at Wikidata-->
[[Category:If-then-else templates]]
[[Category:Sandbox templates]]
}}</includeonly>