<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://opensimulator.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ABasepage_subpage%2Fdoc</id>
		<title>Template:Basepage subpage/doc - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://opensimulator.org/index.php?action=history&amp;feed=atom&amp;title=Template%3ABasepage_subpage%2Fdoc"/>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Template:Basepage_subpage/doc&amp;action=history"/>
		<updated>2026-05-13T12:42:39Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.19.9</generator>

	<entry>
		<id>http://opensimulator.org/index.php?title=Template:Basepage_subpage/doc&amp;diff=26201&amp;oldid=prev</id>
		<title>Fritigern: Created page with &quot;{{documentation subpage}} &lt;!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --&gt;  This is the {{tl|basepage subpage}} meta-template.  This template helps other ...&quot;</title>
		<link rel="alternate" type="text/html" href="http://opensimulator.org/index.php?title=Template:Basepage_subpage/doc&amp;diff=26201&amp;oldid=prev"/>
				<updated>2011-10-21T10:20:08Z</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;  This is the {{tl|basepage subpage}} meta-template.  This template helps other ...&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;
&lt;br /&gt;
This is the {{tl|basepage subpage}} meta-template.&lt;br /&gt;
&lt;br /&gt;
This template helps other templates detect if they are on a '''basepage''', '''subpage''' or '''subsubpage'''.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
This template takes one or more parameters, like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the template is on the page &amp;quot;User:Example&amp;quot;, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| page = User:Example&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If the template is on &amp;quot;User:Example/test&amp;quot; or &amp;quot;User:Example/test/test&amp;quot; or any page lower than that, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| page = User:Example/test/test&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
This template can also detect &amp;quot;subsubpages&amp;quot;, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| Subsubpage text&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the template is on &amp;quot;User:Example/test/test&amp;quot; or any page lower than that, it will return this:&lt;br /&gt;
&lt;br /&gt;
:{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| Subsubpage text&lt;br /&gt;
| page = User:Example/test/test&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 some specific page type. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| &lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above will render nothing when on &amp;quot;User:Example/test/test&amp;quot; or lower, but will return this when on &amp;quot;User:Example/test&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
:{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| &lt;br /&gt;
| page = User:Example/test&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== The &amp;quot;page&amp;quot; parameter ===&lt;br /&gt;
&lt;br /&gt;
For testing and demonstration purposes this template can take a parameter named '''page'''. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| page = User:Example/test&lt;br /&gt;
}}&lt;br /&gt;
&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 this:&lt;br /&gt;
&lt;br /&gt;
:{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| page = User:Example/test&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The '''page''' parameter makes this template behave exactly as if on that page. Thus, if a subsubpagename like &amp;quot;User:Example/test/test&amp;quot; is fed, then it returns the subsubpage text if there is one, otherwise it returns the subpage text. &lt;br /&gt;
&lt;br /&gt;
The pagename doesn't have to be an existing page. &lt;br /&gt;
&lt;br /&gt;
If the parameter is empty or undefined, the name of the current page determines the result.&lt;br /&gt;
&lt;br /&gt;
You can make it so your template also understands the '''page''' parameter. That means you can demonstrate the different appearances of your template in the documentation for your template. Then do like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| Basepage text&lt;br /&gt;
| Subpage text&lt;br /&gt;
| page = {{{page|}}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Technical details ===&lt;br /&gt;
&lt;br /&gt;
Templates have a problem to handle parameter data that contains equal signs &amp;quot;&amp;lt;code&amp;gt;=&amp;lt;/code&amp;gt;&amp;quot;. But that is easily solved by using numbered parameters. Like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{basepage subpage&lt;br /&gt;
| 1 = Basepage text&lt;br /&gt;
| 2 = Subpage text&lt;br /&gt;
| 3 = Subsubpage text&lt;br /&gt;
| page = {{{page|}}}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This template detects subpages even when used in namespaces that doesn't have the MediaWiki [[meta:Link#Subpage feature|subpage feature]] enabled. Thus this template works the same in all namespaces.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- CATEGORIES AND INTERWIKIS HERE, THANKS --&amp;gt;&lt;br /&gt;
[[Category:Metatemplates]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Fritigern</name></author>	</entry>

	</feed>