<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://cellan.joemonson.com/index.php?action=history&amp;feed=atom&amp;title=Template%3AMain_talk_other_flex%2Fdoc</id>
	<title>Template:Main talk other flex/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://cellan.joemonson.com/index.php?action=history&amp;feed=atom&amp;title=Template%3AMain_talk_other_flex%2Fdoc"/>
	<link rel="alternate" type="text/html" href="http://cellan.joemonson.com/index.php?title=Template:Main_talk_other_flex/doc&amp;action=history"/>
	<updated>2026-10-25T17:32:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.0</generator>
	<entry>
		<id>http://cellan.joemonson.com/index.php?title=Template:Main_talk_other_flex/doc&amp;diff=9523&amp;oldid=prev</id>
		<title>Cellan3: Created page with &quot;{{Documentation subpage}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt; __NOTOC__ This is the {{tl|main talk other flex}} template.  It helps other templates detect what type of page they are on.  Documentation for all these templates are at {{tl|main talk other}}.   This template works exactly the same as the {{tlf|main talk other}} template, but it has some minor internal differences. The documentation at {{tlf|main talk other}} covers some o...&quot;</title>
		<link rel="alternate" type="text/html" href="http://cellan.joemonson.com/index.php?title=Template:Main_talk_other_flex/doc&amp;diff=9523&amp;oldid=prev"/>
		<updated>2025-04-08T21:29:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt; __NOTOC__ This is the {{tl|main talk other flex}} template.  It helps other templates detect what type of page they are on.  Documentation for all these templates are at {{tl|main talk other}}.   This template works exactly the same as the {{tlf|main talk other}} template, but it has some minor internal differences. The documentation at {{tlf|main talk other}} covers some o...&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;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&amp;gt;&lt;br /&gt;
__NOTOC__&lt;br /&gt;
This is the {{tl|main talk other flex}} template.&lt;br /&gt;
&lt;br /&gt;
It helps other templates detect what type of page they are on.&lt;br /&gt;
&lt;br /&gt;
Documentation for all these templates are at {{tl|main talk other}}. &lt;br /&gt;
&lt;br /&gt;
This template works exactly the same as the {{tlf|main talk other}} template, but it has some minor internal differences. The documentation at {{tlf|main talk other}} covers some of the differences, the rest are explained below.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note!&amp;#039;&amp;#039;&amp;#039; Do &amp;#039;&amp;#039;not&amp;#039;&amp;#039; optimise or cut away any &amp;quot;unnecessary&amp;quot; parts of the code in this template. This code serves as an example to copy and paste from and &amp;#039;&amp;#039;then&amp;#039;&amp;#039; modify, when one wants to make other templates that detect more complex namespace combinations. That&amp;#039;s why the code contains a full list of the namespaces, even for the &amp;quot;other&amp;quot; case.&lt;br /&gt;
&lt;br /&gt;
=== About the code ===&lt;br /&gt;
&lt;br /&gt;
The line &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;| {{lc:{{ns:0}}}} = &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot; probably needs some explanation. Currently mainspace (article space) doesn&amp;#039;t have a name, so for mainspace the magic word &amp;lt;nowiki&amp;gt;{{NAMESPACE}}&amp;lt;/nowiki&amp;gt; returns an empty string. Fortunately MediaWiki switch-cases can handle empty strings. So that line could simply be &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;| = &amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot;. But just in case the mainspace ever gets a name we use the &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ns:0}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot; which should give the name of namespace 0, that is mainspace. And since we lower case the input then we also have to lower case the value we compare, thus we add &amp;quot;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{lc:}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&amp;quot;. Another reason we use that code is in-case people want to reuse that approach for the other namespaces when they reuse this code elsewhere. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!-- ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE --&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>Cellan3</name></author>
	</entry>
</feed>