<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.avlis.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ANs_detect</id>
	<title>Template:Ns detect - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.avlis.org/w/index.php?action=history&amp;feed=atom&amp;title=Template%3ANs_detect"/>
	<link rel="alternate" type="text/html" href="https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;action=history"/>
	<updated>2026-05-08T06:32:46Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43428&amp;oldid=prev</id>
		<title>Gorgon: Missed a space.</title>
		<link rel="alternate" type="text/html" href="https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43428&amp;oldid=prev"/>
		<updated>2017-02-03T06:57:49Z</updated>

		<summary type="html">&lt;p&gt;Missed a space.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:57, 3 February 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l248&quot;&gt;Line 248:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 248:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you intend to use &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Tables wikitables]&amp;lt;/span&amp;gt; as parameter values in this template, then you need to know this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you intend to use &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Tables wikitables]&amp;lt;/span&amp;gt; as parameter values in this template, then you need to know this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Templates Templates]&amp;lt;/span&amp;gt; have a problem handling parameter data that contains pipes &quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name | param1 }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template|help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Therefore templates can not handle wikitables as input, unless you escape them by using the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word (parser function - see: &amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]&amp;lt;/span&amp;gt;). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:Table#Other_table_syntax | HTML wikimarkup]] for the table code, which is more robust.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Templates Templates]&amp;lt;/span&amp;gt; have a problem handling parameter data that contains pipes &quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name | param1 }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template | help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Therefore templates can not handle wikitables as input, unless you escape them by using the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word (parser function - see: &amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]&amp;lt;/span&amp;gt;). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:Table#Other_table_syntax | HTML wikimarkup]] for the table code, which is more robust.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word, and the template is ignored when using it.''&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word, and the template is ignored when using it.''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ns detect | template = [[Category:Templates |{{PAGENAME}}]] }}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ns detect | template = [[Category:Templates |{{PAGENAME}}]] }}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gorgon</name></author>
	</entry>
	<entry>
		<id>https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43426&amp;oldid=prev</id>
		<title>Gorgon: Updated HTML wikimarkup link to markup specific to wikitables and tweaked example spacing.</title>
		<link rel="alternate" type="text/html" href="https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43426&amp;oldid=prev"/>
		<updated>2017-02-03T06:37:08Z</updated>

		<summary type="html">&lt;p&gt;Updated HTML wikimarkup link to markup specific to wikitables and tweaked example spacing.&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 06:37, 3 February 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l66&quot;&gt;Line 66:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 66:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Note:''' The following examples use multiple lines for improved readability. All of them can be written as single lines as well.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''Note:''' The following examples use multiple lines for improved readability. All of them can be written as single lines as well.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;E.g., &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ns detect | main = Article text | talk = Talk page text | other = Other pages text}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the first example below.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;E.g., &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ns detect | main = Article text | talk = Talk page text | other = Other pages text }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the first example below.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l197&quot;&gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;E.g., A sandbox page in a userspace &amp;lt;code&amp;gt;User:Example/sandbox&amp;lt;/code&amp;gt; for testing your template '''&amp;lt;nowiki&amp;gt;{{mytemplate}}&amp;lt;/nowiki&amp;gt;''' as if it was in the main namespace:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;E.g., A sandbox page in a userspace &amp;lt;code&amp;gt;User:Example/sandbox&amp;lt;/code&amp;gt; for testing your template '''&amp;lt;nowiki&amp;gt;{{mytemplate}}&amp;lt;/nowiki&amp;gt;''' as if it was in the main namespace:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:'''Code in User:Example/sandbox:''' &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | demospace = main}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | page = Example page}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:'''Code in User:Example/sandbox:''' &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | demospace = main }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | page = Example page }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:'''Note:''' There is no &amp;quot;Main:&amp;quot; prefix on pages in the main namespace, so only the &amp;lt;code&amp;gt;Example page&amp;lt;/code&amp;gt; &amp;quot;pagename&amp;quot; is required.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;:'''Note:''' There is no &amp;quot;Main:&amp;quot; prefix on pages in the main namespace, so only the &amp;lt;code&amp;gt;Example page&amp;lt;/code&amp;gt; &amp;quot;pagename&amp;quot; is required.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l248&quot;&gt;Line 248:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 248:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you intend to use &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Tables wikitables]&amp;lt;/span&amp;gt; as parameter values in this template, then you need to know this:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you intend to use &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Tables wikitables]&amp;lt;/span&amp;gt; as parameter values in this template, then you need to know this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Templates Templates]&amp;lt;/span&amp;gt; have a problem handling parameter data that contains pipes &quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name|param1}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template|help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Therefore templates can not handle wikitables as input, unless you escape them by using the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word (parser function - see: &amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]&amp;lt;/span&amp;gt;). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;HTML_in_wikitext &lt;/del&gt;| HTML wikimarkup]] for the table code, which is more robust.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Templates Templates]&amp;lt;/span&amp;gt; have a problem handling parameter data that contains pipes &quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name | param1 }}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template|help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Therefore templates can not handle wikitables as input, unless you escape them by using the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word (parser function - see: &amp;lt;span class=&quot;plainlinks&quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]&amp;lt;/span&amp;gt;). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Table#Other_table_syntax &lt;/ins&gt;| HTML wikimarkup]] for the table code, which is more robust.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word, and the template is ignored when using it.''&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word, and the template is ignored when using it.''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ns detect | template = [[Category:Templates |{{PAGENAME}}]] }}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{ns detect | template = [[Category:Templates |{{PAGENAME}}]] }}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Gorgon</name></author>
	</entry>
	<entry>
		<id>https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43414&amp;oldid=prev</id>
		<title>Gorgon: Template:Ns detect (Namespace detect) - for helping other templates and pages detect what type of namespace they are used in, and can return different results when used in them.</title>
		<link rel="alternate" type="text/html" href="https://wiki.avlis.org/w/index.php?title=Template:Ns_detect&amp;diff=43414&amp;oldid=prev"/>
		<updated>2017-02-02T15:47:37Z</updated>

		<summary type="html">&lt;p&gt;Template:Ns detect (Namespace detect) - for helping other templates and pages detect what type of namespace they are used in, and can return different results when used in them.&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;
| avlis wiki = {{{avlis wiki| {{{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;
| 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;
&lt;br /&gt;
== Template:Ns detect (Namespace detect) ==&lt;br /&gt;
&lt;br /&gt;
This template is based on &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Template:Namespace_detect Template:Namespace detect]&amp;lt;/span&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
It uses the original markup, modified for Avlis wiki namespaces. The documentation below was copied to this template, since we do not use [[Wikipedia:Wikipedia:Template_documentation#How_to_create_a_documentation_subpage | documentation sub-pages]]. It has also been modified for Avlis namespaces, and most of the &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/MediaWiki MediaWiki]&amp;lt;/span&amp;gt; specific information, links and sub-templates have either been removed, or modified for the Avlis wiki. It has been reformatted, and several sections modified for improved clarity.&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Template:Namespace_detect/doc original template documentation]&amp;lt;/span&amp;gt; for further details.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Template documentation ==&lt;br /&gt;
&lt;br /&gt;
This is the '''&amp;lt;nowiki&amp;gt;{{ns detect}}&amp;lt;/nowiki&amp;gt;''' (Namespace detect) meta-template.&lt;br /&gt;
&lt;br /&gt;
It helps other templates and pages detect what type of namespace they are used in, and can return different results when used in them.&lt;br /&gt;
&lt;br /&gt;
It detects and groups all of the different &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://wiki.avlis.org/mediawiki/api.php?action=query&amp;amp;meta=siteinfo&amp;amp;siprop=namespaces namespaces]&amp;lt;/span&amp;gt; used on the Avlis wiki into several types:&lt;br /&gt;
&lt;br /&gt;
:'''main''' = Main/article namespace, as in normal Avlis wiki articles.&lt;br /&gt;
:'''talk''' = Any talk namespace, such as page names that start with &amp;quot;Talk:&amp;quot;, &amp;quot;User talk:&amp;quot;, &amp;quot;File talk:&amp;quot; and so on.&lt;br /&gt;
:'''user, avlis wiki, file, mediawiki, template, help, and category''' = The other namespaces, except for talk namespace pages.&lt;br /&gt;
:'''other''' = Any namespaces that were not specified as a parameter to the template. ''See the '''Note:''' in the &amp;quot;[[#Parameters | Parameters]]&amp;quot; section below.''&lt;br /&gt;
&lt;br /&gt;
''For backwards compatibility, this template also understands the old name '''image''' for '''file'''. But using '''image''' is now deprecated.''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The following examples use multiple lines for improved readability. All of them can be written as single lines as well.&lt;br /&gt;
&lt;br /&gt;
E.g., &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ns detect | main = Article text | talk = Talk page text | other = Other pages text}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; for the first example below.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This template takes one or more parameters, named after the different namespace types listed above. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| main  = Article text&lt;br /&gt;
| talk  = Talk page text&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the template is in a main (article) namespace page, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect | demospace = main&lt;br /&gt;
| main  = Article text&lt;br /&gt;
| talk  = Talk page text&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If the template is used in any other namespace page than a main (article), or a talk page, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| main  = Article text&lt;br /&gt;
| talk  = Talk page text&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The example above made the template return something for all other namespace page types. But if we don't use the '''other''' parameter, or leave it empty, then it will not return anything for the other namespace page types. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| file     = File page text&lt;br /&gt;
| category = Category page text&lt;br /&gt;
| other    =&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In any pages, other than file and category namespace pages, the code above will render nothing.&lt;br /&gt;
&amp;lt;!-- Do not remove this one. It is supposed to render nothing, but we have it here for testing purposes. --&amp;gt;&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| file     = File page text&lt;br /&gt;
| category = Category page text&lt;br /&gt;
| other    =&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By using an empty parameter, you can make it so the template doesn't render anything for a specific namespace type page. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| main  =&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above will render nothing when in main (article) namespace pages, but will return this when in other namespace type pages:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| main  =&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As an extended example of empty parameter usage, if you need to assign the same value to more than one namespace type parameter as a result, and the value is a larger block of code, it is inefficient to duplicate the same code for multiple parameter values. Instead, you can use empty parameters to return nothing for namespace type pages that you don't want the value used in (all except the ones you need), and then use the '''other''' parameter value to return the result of your block of code for the namespace type pages that you do want it in. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| talk = | avlis wiki = | file = | mediawiki = | help = | category =&lt;br /&gt;
| other = {{{|Result of large, multi-line block of code.}}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
For the result below, when in main (article), user and template namespace pages, the code above will use the '''other''' parameter value, since those 3 namespace types weren't included as parameters. When in all other namespace type pages, nothing is returned, since they all have empty values:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| talk = | avlis wiki = | file = | mediawiki = | help = | category =&lt;br /&gt;
| other = {{{|Result of large, multi-line block of code.}}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Demospace and page ===&lt;br /&gt;
&lt;br /&gt;
For testing and demonstration purposes, this template can take two parameters, named '''demospace''' and '''page'''. Only assign a value to one of these in your template. If both have values assigned, then only the '''demospace''' parameter will be used.&lt;br /&gt;
&lt;br /&gt;
'''Demospace''' understands any of the namespace type names used by this template, including the '''other''' namespace type. It tells the template to behave like it is in a specific namespace type page. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| main      = Article text&lt;br /&gt;
| other     = Other pages text&lt;br /&gt;
| demospace = main&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No matter what namespace the code above is used in, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| main      = Article text&lt;br /&gt;
| other     = Other pages text&lt;br /&gt;
| demospace = main&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''page''' parameter instead takes a &amp;quot;namespace:pagename&amp;quot; value. It makes this template behave as if rendered in that page's namespace type. The page name doesn't have to be an existing page. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| user  = User page text&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
| page  = User:Example&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No matter what namespace the code above is used in, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{ns detect&lt;br /&gt;
| user  = User page text&lt;br /&gt;
| other = Other pages text&lt;br /&gt;
| page  = User:Example&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The value of '''page''' is only used to determine the namespace type of that page. The &amp;quot;pagename&amp;quot; part of the &amp;quot;namespace:pagename&amp;quot; value isn't used for anything, but is required by the '''&amp;lt;nowiki&amp;gt;{{NAMESPACE}}&amp;lt;/nowiki&amp;gt;''', '''&amp;lt;nowiki&amp;gt;{{TALKSPACE}}&amp;lt;/nowiki&amp;gt;''' and '''&amp;lt;nowiki&amp;gt;{{SUBJECTSPACE}}&amp;lt;/nowiki&amp;gt;''' magic words that are used by the '''&amp;lt;nowiki&amp;gt;{{ns detect}}&amp;lt;/nowiki&amp;gt;''' template (see: [http://www.mediawiki.org/wiki/Help:Magic_words#Namespaces Help:Magic words#Namespaces]). The '''demospace''' parameter is usually a better choice for setting an alternate namespace type in testing, unless you need to use a &amp;quot;namespace:pagename&amp;quot; value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It may be convenient to define the '''demospace''' and/or '''page''' parameters as (optional) named parameters by the page using your template, and send them on to the '''&amp;lt;nowiki&amp;gt;{{ns detect}}&amp;lt;/nowiki&amp;gt;''' template.&lt;br /&gt;
&lt;br /&gt;
E.g., A sandbox page in a userspace &amp;lt;code&amp;gt;User:Example/sandbox&amp;lt;/code&amp;gt; for testing your template '''&amp;lt;nowiki&amp;gt;{{mytemplate}}&amp;lt;/nowiki&amp;gt;''' as if it was in the main namespace:&lt;br /&gt;
&lt;br /&gt;
:'''Code in User:Example/sandbox:''' &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | demospace = main}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{mytemplate | page = Example page}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
&lt;br /&gt;
:'''Note:''' There is no &amp;quot;Main:&amp;quot; prefix on pages in the main namespace, so only the &amp;lt;code&amp;gt;Example page&amp;lt;/code&amp;gt; &amp;quot;pagename&amp;quot; is required. &lt;br /&gt;
&lt;br /&gt;
:''This also allows testing other namespaces types from the same sandbox page by changing the parameter values, even using preview mode.''&lt;br /&gt;
&lt;br /&gt;
Then in your '''&amp;lt;nowiki&amp;gt;{{mytemplate}}&amp;lt;/nowiki&amp;gt;''' template, do like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| main      = Article text&lt;br /&gt;
| other     = Other pages text&lt;br /&gt;
| demospace = {{{demospace|}}}&lt;br /&gt;
| page      = {{{page|}}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These parameters will be used by the template only if defined by the page using your template. If both the '''demospace''' and '''page''' parameters are empty, or undefined, then the template will detect namespace types as usual for the page. As described above, if both the '''demospace''' and '''page''' parameters have values assigned, then only the '''demospace''' parameter will be used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
List of all parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;white-space: pre&amp;quot;&amp;gt;&lt;br /&gt;
{{ns detect&lt;br /&gt;
| main       =&lt;br /&gt;
| talk       =&lt;br /&gt;
| user       =&lt;br /&gt;
| avlis wiki =&lt;br /&gt;
| file       =&lt;br /&gt;
| mediawiki  =&lt;br /&gt;
| template   =&lt;br /&gt;
| help       =&lt;br /&gt;
| category   =&lt;br /&gt;
| other      =&lt;br /&gt;
| demospace  = {{{demospace|}}}&lt;br /&gt;
               One of: main, talk, user, avlis wiki,&lt;br /&gt;
                       file, mediawiki, template,&lt;br /&gt;
                       help, category, other&lt;br /&gt;
| page       = {{{page|}}} E.g., User:Example&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Empty values for the '''main''' through '''category''' parameters are different than not including (defining) them. An undefined parameter (i.e, one you do not include in your template usage) will use the result of the '''other''' parameter when in that namespace type. Any that are defined, but not assigned a value (i.e, included in the template usage, but nothing after the = ) will render nothing when used in that namespace type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
If you intend to use &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Tables wikitables]&amp;lt;/span&amp;gt; as parameter values in this template, then you need to know this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Templates Templates]&amp;lt;/span&amp;gt; have a problem handling parameter data that contains pipes &amp;quot;&amp;lt;code&amp;gt;|&amp;lt;/code&amp;gt;&amp;quot;, unless the pipe is inside another template &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{name|param1}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;, or inside a piped link &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;[[Help:Template|help]]&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;. Therefore templates can not handle wikitables as input, unless you escape them by using the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word (parser function - see: &amp;lt;span class=&amp;quot;plainlinks&amp;quot;&amp;gt;[http://www.mediawiki.org/wiki/Help:Magic_words#Other Help:Magic words#Other]&amp;lt;/span&amp;gt;). This makes it hard to use wikitables as parameters in templates. Instead, the usual solution is to use [[Wikipedia:Help:HTML_in_wikitext | HTML wikimarkup]] for the table code, which is more robust.&lt;br /&gt;
&lt;br /&gt;
'''''Note:''' [[Template:!]] functionality was replaced in MediaWiki version 1.24 by the '''&amp;lt;nowiki&amp;gt;{{!}}&amp;lt;/nowiki&amp;gt;''' magic word, and the template is ignored when using it.''&lt;br /&gt;
&lt;br /&gt;
{{ns detect | template = [[Category:Templates |{{PAGENAME}}]] }}&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>Gorgon</name></author>
	</entry>
</feed>