<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
		<id>http://www.mansun.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AMain_other%2Fdoc</id>
		<title>Template:Main other/doc - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://www.mansun.wiki/index.php?action=history&amp;feed=atom&amp;title=Template%3AMain_other%2Fdoc"/>
		<link rel="alternate" type="text/html" href="http://www.mansun.wiki/index.php?title=Template:Main_other/doc&amp;action=history"/>
		<updated>2026-05-03T05:43:03Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://www.mansun.wiki/index.php?title=Template:Main_other/doc&amp;diff=2303&amp;oldid=prev</id>
		<title>DarkMavis: Created page with &quot;{{Documentation subpage}} {{Template shortcut |ns0}} &lt;!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --&gt; {{redirect3|noquotes|Template:When in article}}  This is the...&quot;</title>
		<link rel="alternate" type="text/html" href="http://www.mansun.wiki/index.php?title=Template:Main_other/doc&amp;diff=2303&amp;oldid=prev"/>
				<updated>2015-07-16T00:35:16Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} {{Template shortcut |ns0}} &amp;lt;!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --&amp;gt; {{redirect3|noquotes|&lt;a href=&quot;/index.php?title=Template:When_in_article&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Template:When in article (page does not exist)&quot;&gt;Template:When in article&lt;/a&gt;}}  This is the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Documentation subpage}}&lt;br /&gt;
{{Template shortcut |ns0}}&lt;br /&gt;
&amp;lt;!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
{{redirect3|noquotes|[[Template:When in article]]}}&lt;br /&gt;
&lt;br /&gt;
This is the {{tl|main other}} meta-template.&lt;br /&gt;
&lt;br /&gt;
This template helps other templates detect if they are on a main space (article) page or some &amp;quot;other&amp;quot; type of page.&lt;br /&gt;
&lt;br /&gt;
===Basic usage===&lt;br /&gt;
This template usually takes two parameters, like this:&lt;br /&gt;
: {{tc|main other&amp;amp;#32;|''result if in mainspace''&amp;amp;#32;|''result if elsewhere''}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the template is on a main space (article) page, it will return this:&lt;br /&gt;
: {{main other |demospace=main |''result if in mainspace'' |''result if elsewhere''}}&lt;br /&gt;
&lt;br /&gt;
If the template is on any other page, it will return this:&lt;br /&gt;
: {{main other |''result if in mainspace'' |''result if elsewhere''}}&lt;br /&gt;
&lt;br /&gt;
A typical usage case could be to make it so that a template only adds a category when on an article. Thus not adding other pages that just show the template. Like this:&lt;br /&gt;
: {{tlf|main other&amp;amp;#32;|&amp;lt;nowiki&amp;gt;[[Category:Some article maintenance category]]&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
Note that guidelines do not support categorization in templates.&lt;br /&gt;
&lt;br /&gt;
Or to warn that a template should not be used on other pages:&lt;br /&gt;
: {{tlf|main other&amp;amp;#32;|&amp;amp;#32;|This template should only be used in articles.}}&lt;br /&gt;
&lt;br /&gt;
Note that in the first case above the &amp;quot;other&amp;quot; parameter was not used, and in the second example the &amp;quot;main&amp;quot; parameter was left empty.&lt;br /&gt;
&lt;br /&gt;
===Demospace===&lt;br /&gt;
For testing and demonstration purposes, this template can take a parameter named '''demospace'''. &lt;br /&gt;
* If it has the value '''main''' it returns the article text.&lt;br /&gt;
* It if has the value '''other''' or any other value such as the name of some other namespace it returns the other pages text.&lt;br /&gt;
* If the parameter is empty or undefined, the actual page type determines the result.&lt;br /&gt;
&lt;br /&gt;
Like this:&lt;br /&gt;
: {{tlf|main other&amp;amp;#32;|''result if in mainspace''&amp;amp;#32;|''result if elsewhere''&amp;amp;#32;|demospace{{=}}main}}&lt;br /&gt;
&lt;br /&gt;
No matter on what kind of page the code above is used, it will return: {{main other |''result if in mainspace'' |''result if elsewhere'' |demospace=main}}&lt;br /&gt;
&lt;br /&gt;
You can make it so your template also understands the '''demospace''' parameter. That means you can demonstrate the different appearances of your template in the documentation for your template:&lt;br /&gt;
: {{tlf|main other&amp;amp;#32;|''result if in mainspace''&amp;amp;#32;|''result if elsewhere''&amp;amp;#32;|&amp;lt;nowiki&amp;gt;demospace={{{demospace|}}}&amp;lt;/nowiki&amp;gt;&amp;amp;#32;}}&lt;br /&gt;
&lt;br /&gt;
===Technical details===&lt;br /&gt;
This template detects article &amp;quot;Talk:&amp;quot; pages as type '''other'''.&lt;br /&gt;
&lt;br /&gt;
This template works like {{tl|main talk other}}. For more examples and technical details, see the documentation there.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Namespace and pagename-detecting templates}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox |&lt;br /&gt;
| &amp;lt;!-- CATEGORIES BELOW THIS LINE, PLEASE: --&amp;gt;&lt;br /&gt;
[[Category:Namespace manipulation templates]]&lt;br /&gt;
&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>DarkMavis</name></author>	</entry>

	</feed>