Template talk:Single namespace
This is the talk page for discussing improvements to the Single namespace template. | |||
---|---|---|---|
|
Contents
Previous Contributors
(cur | prev) 21:05, 14 October 2016 BU Rob13 (talk | contribs) m . . (117 bytes) (0) . . (Changed protection level of Template:Single namespace: Highly visible template; swapping to template protection ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) (thank)
(cur | prev) 11:09, 23 April 2012 AGK (talk | contribs) m . . (117 bytes) (0) . . (Protected Template:Single namespace: Highly-visible template (thousands of transclusions) ([edit=autoconfirmed] (indefinite) [move=sysop] (indefinite))) (thank)
(cur | prev) 21:32, 27 June 2011 Bsadowski1 (talk | contribs) m . . (117 bytes) (0) . . (Unprotected Template:Single namespace: Unprotect per request. I won't consider it wheel-warring if re-protected.) (thank)
(cur | prev) 08:53, 27 June 2011 Bsadowski1 (talk | contribs) m . . (117 bytes) (0) . . (Protected Template:Single namespace: Highly visible template ([edit=sysop] (indefinite) [move=sysop] (indefinite))) (thank)
Usage
This is a meta-template; it should only be used within other templates. It is used for namespace detection as a simplification of {{Foo other|Example|{{Incorrect namespace|foo}}}}
. If the template is transcluded in the Foo namespace, it will transclude "Example"; if not, it will transclude {{Incorrect namespace}}. Note that {{Incorrect namespace}} does not work in the template namespace.
The first parameter is necessary. It defines which namespace is the correct namespace for the template.
The second parameter is optional. It allows something (usually a category) to be transcluded in the correct namespace.
Examples
Correct namespace
{{Single namespace|Template|This text is only displayed in the Template namespace}}
Incorrect namespace
{{Single namespace|Category|This text is only displayed in the Category namespace}}
{{#invoke:Message box|tmbox}}
Supporting templates
- {{Incorrect namespace}}
- {{Book other}}
- {{Category other}}
- {{Draft other}}
- {{File other}}
- {{Help other}}
- {{Main other}}
- {{Module other}}
- {{Portal other}}
- {{Talk other}}
- {{Template other}}
- {{User other}}
- {{WikiAlpha other}}
See also
The above documentation is transcluded from Template:Single namespace/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |