Difference between revisions of "Template:Namespace detect"

From CWCki
Jump to navigation Jump to search
(Created new template to repair Mbox template.)
 
m
 
(2 intermediate revisions by one other user not shown)
Line 45: Line 45:
</nowiki>'''  
</nowiki>'''  


- Displays:{{namespace detect
- Displays:
{{namespace detect
| main  = Article text
| main  = Article text
| talk  = Talk page text
| talk  = Talk page text
| other = Other pages text
| other = Other pages text
}}
}}
In the above example, the template displayed the message for "other pages", because this page is not a main or talk page. However, if we included a parameter for templates...
'''<nowiki>{{namespace detect
| main  = Article text
| talk  = Talk page text
| other = Other pages text
| template = Template pages text
}}
</nowiki>'''
- Displays:
{{namespace detect
| main  = Article text
| talk  = Talk page text
| other = Other pages text
| template = Template pages text
}}
}}
}}
[[Category:Metatemplates|{{PAGENAME}}]]</noinclude>
[[Category:Metatemplates|{{PAGENAME}}]]</noinclude>
</noinclude>

Latest revision as of 17:01, 23 December 2010

Usage

These usage notes will not be included in articles bearing this template.

This is a metatemplate used to help other templates detect what type of page they are on. The format for using this template is as follows:

{{namespace detect | main = Article text | talk = Talk page text | other = Other pages text }}

- Displays: Other pages text

In the above example, the template displayed the message for "other pages", because this page is not a main or talk page. However, if we included a parameter for templates...


{{namespace detect | main = Article text | talk = Talk page text | other = Other pages text | template = Template pages text }}


- Displays: Template pages text