Template:Incorrect namespace/doc: Difference between revisions

Content deleted Content added
Fixing.
Fixing section heading; improving example.
Line 3:
This template is for use in other templates in conjunction with namespace detection. It adds pages to [[:Category:Pages with incorrectly transcluded templates]].
 
===Parameters===
The parameter inserts text in the message to specify the namespace the template in question should use.
 
===Example===
<code><nowiki>{{AmboxOmbox</nowiki><br/>
| type = style<br/>
| text = Example text.<br/>
}}<br/>
<nowiki><includeonly>{{MainBook other|[[Category:Example category]]|{{Incorrect namespace|mainbook}}}}</includeonly></nowiki></code>
 
produces:
 
{{AmboxOmbox
| type = style
| text = Example text.
}}
{{Book other||{{Incorrect namespace|book}}}}
{{Ambox
| type = content
| text = The above template should only be transcluded in the main namespace.
}}
 
In the above example, transcluding the article message box will categorise mainbook namespace pages into [[:Category:Example category]] and produce this template underneath the message box for pages outside the mainbook namespace.
 
<includeonly>