Template:NSGuard: Difference between revisions

From Polcompball Wiki
Jump to navigationJump to search
Content added Content deleted
No edit summary
No edit summary
Line 1: Line 1:
{{#ifeq: {{#expr: {{NAMESPACENUMBER}} = 10 or {{NAMESPACENUMBER}} = 0}}|1|{{{1}}}|{{MessageBox
<includeonly>{{#ifeq: {{#expr: {{NAMESPACENUMBER}} = 10 or {{NAMESPACENUMBER}} = 0}}|1|{{{1}}}|{{MessageBox
|header = Incorrect Namespace
|header = Incorrect Namespace
|text = This infobox is exclusively for usage in the main namespace, {{{2}}}.
|text = This infobox is exclusively for usage in the main namespace, {{{2}}}.
Line 6: Line 6:
}}
}}
[[Category:Pages Misusing Namespace Restricted Templates]]
[[Category:Pages Misusing Namespace Restricted Templates]]
}}</includeonly><noinclude>
}}
{{Documentation}}
</noinclude>

Revision as of 18:38, 14 March 2023

This template guards a template to only be useable in the main and template namespaces, to prevent misuse by unaware users. Users who include templates guarded by this template will get a messagebox with a custom messsage of you choosing notifying them of what to do.

Syntax

{{NSGuard
|<content>
|<error message>
}}