13,208
edits
(Clarification) |
|||
Line 22: | Line 22: | ||
<nowiki>{{</nowiki>'''main other'''<nowiki>|</nowiki>''text if main''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki> | <nowiki>{{</nowiki>'''main other'''<nowiki>|</nowiki>''text if main''<nowiki>|</nowiki>''text if other'' <nowiki>|</nowiki>''demospace=''<nowiki>}}</nowiki> | ||
;text if main: Optional text to use if the template is on a page in the main namespace. | ; text if main: Optional text to use if the template is on a page in the main namespace. | ||
;text if other: Optional text to use if the template is on a page in any other namespace | ; text if other: Optional text to use if the template is on a page in any other namespace. | ||
; demospace: Optional namespace override. If it is empty or undefined the namespace of the page with the template on will be used, if it is '''main''' then '''text if main''' will be shown and if it is '''other''' or any other namespace then '''text if other''' will be used. | |||
== Examples == | == Examples == | ||
=== Text selection === | === Text selection === | ||
< | <nowiki>Since this is not a page in the main namespace/article {{main other|this text will not be shown|this text will be shown}}.</nowiki> | ||
Since this is a | Since this is not a page in the main namespace/article {{main other|this text will not be shown|this text will be shown}}. | ||
</ | |||
Since this is a | |||
< | <nowiki>However with {{main other|a little bit of cheating|this text will not be shown|demospace=main}}...</nowiki> | ||
However with {{main other|a little bit of| | However with {{main other|a little bit of cheating|this text will not be shown|demospace=main}}... | ||
</ | |||
However with {{main other|a little bit of| | |||
=== Category suppression === | === Category suppression === | ||
Using the template like this will only categorize a page when it is in the main | Using the template like this will only categorize a page when it is in the article/main namespace: | ||
< | <nowiki>{{main other|[[Category:Boeing]]}}</nowiki> | ||
{{main other|[[Category:Boeing]]}} | |||
</ | |||
== Related templates == | == Related templates == |