<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.cloudmodding.com/oot/Template:Namespace_detect/history?feed=atom</id>
		<title>Template:Namespace detect - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.cloudmodding.com/oot/Template:Namespace_detect/history?feed=atom"/>
		<link rel="alternate" type="text/html" href="https://wiki.cloudmodding.com/oot/Template:Namespace_detect/history"/>
		<updated>2026-04-05T23:47:24Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https://wiki.cloudmodding.com/woot/index.php?title=Template:Namespace_detect&amp;diff=1818&amp;oldid=prev</id>
		<title>Einstein95: Created page with &quot;{{#switch:   {{lc:               &lt;!--Lower case the result--&gt;     &lt;!--If no or empty &quot;demospace&quot; parameter then detect namespace--&gt;     {{#if:{{{demospace|}}}      | {{{demosp...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.cloudmodding.com/woot/index.php?title=Template:Namespace_detect&amp;diff=1818&amp;oldid=prev"/>
				<updated>2014-07-15T04:23:10Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{#switch:   {{lc:               &amp;lt;!--Lower case the result--&amp;gt;     &amp;lt;!--If no or empty &amp;quot;demospace&amp;quot; parameter then detect namespace--&amp;gt;     {{#if:{{{demospace|}}}      | {{{demosp...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#switch:&lt;br /&gt;
  {{lc:               &amp;lt;!--Lower case the result--&amp;gt;&lt;br /&gt;
    &amp;lt;!--If no or empty &amp;quot;demospace&amp;quot; parameter then detect namespace--&amp;gt;&lt;br /&gt;
    {{#if:{{{demospace|}}} &lt;br /&gt;
    | {{{demospace}}}&lt;br /&gt;
    | {{#if:{{{page|}}} &lt;br /&gt;
      | &amp;lt;!--Detect the namespace in the &amp;quot;page&amp;quot; parameter--&amp;gt;&lt;br /&gt;
        {{#ifeq:{{NAMESPACE:{{{page}}} }}|{{TALKSPACE:{{{page}}} }}&lt;br /&gt;
        | talk&lt;br /&gt;
        | {{SUBJECTSPACE:{{{page}}} }} &lt;br /&gt;
        }}&lt;br /&gt;
      | &amp;lt;!--No &amp;quot;demospace&amp;quot; or &amp;quot;page&amp;quot; parameters, so detect actual namespace--&amp;gt;&lt;br /&gt;
        {{#ifeq:{{NAMESPACE}}|{{TALKSPACE}}&lt;br /&gt;
        | talk&lt;br /&gt;
        | {{SUBJECTSPACE}} &lt;br /&gt;
        }}&lt;br /&gt;
      }}&lt;br /&gt;
    }}&lt;br /&gt;
  }}&lt;br /&gt;
&amp;lt;!-- Only one of the lines below will be executed --&amp;gt;&lt;br /&gt;
&amp;lt;!-- Respecting empty parameters on purpose --&amp;gt;&lt;br /&gt;
| main        &amp;lt;!--&amp;quot;demospace=main&amp;quot; or {{SUBJECTSPACE}}={{ns:0}}=&amp;quot;&amp;quot;--&amp;gt;&lt;br /&gt;
|           = {{{main| {{{other|}}} }}}&lt;br /&gt;
| talk      = {{{talk| {{{other|}}} }}}&lt;br /&gt;
| user      = {{{user| {{{other|}}} }}}&lt;br /&gt;
| project = {{{project| {{{other|}}} }}}&lt;br /&gt;
| file&lt;br /&gt;
| image     = {{{file| {{{image| {{{other|}}} }}} }}}&lt;br /&gt;
| mediawiki = {{{mediawiki| {{{other|}}} }}}&lt;br /&gt;
| template  = {{{template| {{{other|}}} }}}&lt;br /&gt;
| help      = {{{help| {{{other|}}} }}}&lt;br /&gt;
| category  = {{{category| {{{other|}}} }}}&lt;br /&gt;
| book      = {{{book| {{{other|}}} }}}&lt;br /&gt;
| other&lt;br /&gt;
| #default  = {{{other|}}}   &amp;lt;!--&amp;quot;demospace=other&amp;quot; or a new namespace--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;!--End switch--&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template, '''&amp;lt;tt&amp;gt;&amp;lt;nowiki&amp;gt;{{namespace detect}}&amp;lt;/nowiki&amp;gt;&amp;lt;/tt&amp;gt;''', is intended for background usage, generally in other templates, so it's not really meant for end-users to worry about. It functions to identify the current namespace and return content tailored to that namespace. &lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
The template should be called with parameters for each namespace to be used, e.g.:&lt;br /&gt;
&amp;lt;pre&amp;gt;{{namespace detect&lt;br /&gt;
 | main=  Hello world!&lt;br /&gt;
 | help=  How's it going, world?&lt;br /&gt;
 | other= Goodbye, cruel world!&lt;br /&gt;
}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The results of this example should be roughly self-explanatory: if called on the main or help namespaces, the first two messages will appear, respectively. If called on ''any other namespace'', the &amp;quot;other&amp;quot; message will appear. To show nothing at all, parameters may be left out entirely.&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Einstein95</name></author>	</entry>

	</feed>