Content deleted Content added
more efficient substitution template |
→Usage: update |
||
(10 intermediate revisions by 8 users not shown) | |||
Line 11:
: (required) This parameter inserts text in the message to specify the namespace the template in question should use.
; {{parameter|nocat}}
: (optional)
===Example===
<syntaxhighlight lang="wikitext">
{{Ombox
| type = notice
| text = Example text.
}}
</syntaxhighlight>
produces:
{{Ombox
| type = notice | text = Example text. }} {{Mbox
{{Ombox|type=content|image = [[File:Ambox warning orange.svg|50px]]|text={{Error|The above template should only be transcluded in the ''help'' namespace(s).}}}}▼
| type = content
| image = [[File:Ambox warning orange.svg|50px|link=|alt=]]
▲
}}
In the above example, {{tl|Help other}} is used to add pages in the ''help'' namespace to ''Category:Example category''. For pages outside the ''help'' namespace, '''<nowiki>{{Incorrect namespace|help}}</nowiki>''' is used to display the error message box and add the page to ''[[:Category:Pages with templates in the wrong namespace]]''. To omit the error category, use '''<nowiki>{{Incorrect namespace|help|nocat=true}}</nowiki>'''.
Line 31 ⟶ 40:
* {{tl|Incorrect redirect template}}
<includeonly>{{
[[Category:Template namespace templates]]
}}</includeonly>
|