Template:Namespace detect

From Hi-5 World Wiki
Revision as of 06:01, 27 February 2026 by SnazzySun (talk | contribs) (Created page with "{{#switch: {{lc: <!--Lower case the result--> <!--If no or empty "demospace" parameter then detect namespace--> {{#if:{{{demospace|}}} | {{{demospace}}} | {{#if:{{{page|}}} | <!--Detect the namespace in the "page" parameter--> {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }} | talk | {{SUBJECTSPACE:{{{page}}} }} }} | <!--No "demospace" or "page" parameters, so detect actual namespac...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

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