Template:\sandbox/doc: Difference between revisions
Template page
More actions
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 = | | 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}} ...</code> on the /doc page with <code>{{((}}{{var|template_name}}{{ | 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}} ...</code> on the /doc page with <code>{{((}}{{var|template_name}}{{tlf|{{ROOTPAGENAME}}}} ...</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 = - | ||