Template:EnsureNamespace: Difference between revisions
More actions
←Created page with '<onlyinclude>{{#ifeq:{{ucfirst:{{NAMESPACE:{{{1|{{{subject|}}}}}}}}}}|{{ucfirst:{{{2|{{{namespace|}}}}}}}} |{{{1|{{{subject|}}}}}} |{{{2|{{{namespace|}}}}}}:{{{...' |
m 1 revision imported |
(No difference)
| |
Latest revision as of 10:47, 12 August 2026
Ensures a subject gets the desired namespace prefixed, if it doesn't already has it. Does not work with namespace aliases yet, but might be extended to work with them in future.
Usage
{{Template:EnsureNamespace |subject= |namespace= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
subject1 | Page name. With or without desired namespace prefixed. | empty | required | |
namespace2 | Written desired namespace name. Without underscores or any decoration. | empty | required | |
|
<templatedata>JSON</templatedata> ./. {{TemplateBox}}
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard. Existing template documentation Newly created template documentation and imports Wikipedia's help about TemplateData • Commons-specific information Ensures a subject gets the desired namespace prefixed, if it doesn't already has it. Does not work with namespace aliases yet, but might be extended to work with them in future.
| |||||||||||||||
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: all users
Example
{{Template:EnsureNamespace|Commons:QI|Commons}}
renders as:
Commons:Commons:QI
Localization
This template is not intended to be localized.