<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.shadowrunwiki.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ACatMainOther%2Fdoc</id>
	<title>Template:CatMainOther/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.shadowrunwiki.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ACatMainOther%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://www.shadowrunwiki.com/index.php?title=Template:CatMainOther/doc&amp;action=history"/>
	<updated>2026-06-04T06:48:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://www.shadowrunwiki.com/index.php?title=Template:CatMainOther/doc&amp;diff=523&amp;oldid=prev</id>
		<title>Catrone3: Created page with &quot;{{documentation subpage}} &lt;!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --&gt; ==Purpose== * This template helps other templates detect if they are on a main space (article) page or some &quot;other&quot; type of page.  ==Usage== This template usually takes two parameters, like this: : &lt;pre&gt;{{CatMainOther |result if in mainspace |result if elsewhere}}&lt;/pre&gt;  If the template is on a main space (article) page, it will return this: : &#039;&#039;result if in mainspace&#039;&#039;  If the template is on...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.shadowrunwiki.com/index.php?title=Template:CatMainOther/doc&amp;diff=523&amp;oldid=prev"/>
		<updated>2024-03-24T20:31:29Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{documentation subpage}} &amp;lt;!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --&amp;gt; ==Purpose== * 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.  ==Usage== This template usually takes two parameters, like this: : &amp;lt;pre&amp;gt;{{CatMainOther |result if in mainspace |result if elsewhere}}&amp;lt;/pre&amp;gt;  If the template is on a main space (article) page, it will return this: : &amp;#039;&amp;#039;result if in mainspace&amp;#039;&amp;#039;  If the template is on...&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;
&amp;lt;!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --&amp;gt;&lt;br /&gt;
==Purpose==&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;
==Usage==&lt;br /&gt;
This template usually takes two parameters, like this:&lt;br /&gt;
: &amp;lt;pre&amp;gt;{{CatMainOther |result if in mainspace |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;
: &amp;#039;&amp;#039;result if in mainspace&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
If the template is on any other page, it will return this:&lt;br /&gt;
: &amp;#039;&amp;#039;result if elsewhere&amp;#039;&amp;#039;&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;
: &amp;lt;pre&amp;gt;{{CatMainOther |[[Category:Some article maintenance category]]}}&amp;lt;/pre&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;
: &amp;lt;pre&amp;gt;{{CatMainOther | |This template should only be used in articles.}}&amp;lt;/pre&amp;gt;&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;
==Advanced Usage==&lt;br /&gt;
For testing and demonstration purposes, this template can take a parameter named &amp;#039;&amp;#039;&amp;#039;demospace&amp;#039;&amp;#039;&amp;#039;. &lt;br /&gt;
* If it has the value &amp;#039;&amp;#039;&amp;#039;main&amp;#039;&amp;#039;&amp;#039; it returns the article text.&lt;br /&gt;
* It if has the value &amp;#039;&amp;#039;&amp;#039;other&amp;#039;&amp;#039;&amp;#039; 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;
: &amp;lt;pre&amp;gt;{{CatMainOther |result if in mainspace |result if elsewhere |demospace=main}}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
No matter on what kind of page the code above is used, it will return: &amp;#039;&amp;#039;result if in mainspace&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
You can make it so your template also understands the &amp;#039;&amp;#039;&amp;#039;demospace&amp;#039;&amp;#039;&amp;#039; parameter. That means you can demonstrate the different appearances of your template in the documentation for your template:&lt;br /&gt;
: &amp;lt;pre&amp;gt;{{CatMainOther |result if in mainspace |result if elsewhere |demospace={{{demospace|}}} }}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template detects article &amp;quot;Talk:&amp;quot; pages as type &amp;#039;&amp;#039;&amp;#039;other&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- ADD CATEGORIES BELOW THIS LINE --&amp;gt;&lt;br /&gt;
[[Category:Utility templates|{{PAGENAME}}]]&lt;br /&gt;
[[Category:Templates]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Catrone3</name></author>
	</entry>
</feed>