<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://poets.wiki/view/index.php?action=history&amp;feed=atom&amp;title=Template%3AWhen_on_basepage%2Fdoc</id>
	<title>Template:When on basepage/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://poets.wiki/view/index.php?action=history&amp;feed=atom&amp;title=Template%3AWhen_on_basepage%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;action=history"/>
	<updated>2026-09-22T04:58:03Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=6901&amp;oldid=prev</id>
		<title>Matt at 11:16, 14 April 2025</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=6901&amp;oldid=prev"/>
		<updated>2025-04-14T11:16:46Z</updated>

		<summary type="html">&lt;p&gt;&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 07:16, 14 April 2025&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-l5&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&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;This is the {{tl|When on basepage}} meta-template. It helps other templates detect if they are on a &amp;#039;&amp;#039;&amp;#039;basepage&amp;#039;&amp;#039;&amp;#039; (i.e. a page whose name matches the pattern &amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) &amp;#039;&amp;#039;&amp;#039;subpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) or &amp;#039;&amp;#039;&amp;#039;subsubpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;).&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;This is the {{tl|When on basepage}} meta-template. It helps other templates detect if they are on a &amp;#039;&amp;#039;&amp;#039;basepage&amp;#039;&amp;#039;&amp;#039; (i.e. a page whose name matches the pattern &amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) &amp;#039;&amp;#039;&amp;#039;subpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) or &amp;#039;&amp;#039;&amp;#039;subsubpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;).&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;An alternative way to detect whether a page is a subpage is to combine the parser functions &amp;lt;code&amp;gt;#ifeq:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#titleparts&amp;lt;/code&amp;gt;. See &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[#&lt;/del&gt;Alternatives for simpler text&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|Alternatives for simpler text]] &lt;/del&gt;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;An alternative way to detect whether a page is a subpage is to combine the parser functions &amp;lt;code&amp;gt;#ifeq:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#titleparts&amp;lt;/code&amp;gt;. See Alternatives for simpler text 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;div&gt;== Usage ==&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;== Usage ==&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-l32&quot;&gt;Line 32:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 32:&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;== Technical note ==&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;== Technical note ==&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;This template detects subpages in all namespaces, including those without the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[meta:Link#Subpage feature|&lt;/del&gt;MediaWiki subpage feature&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/del&gt;enabled.&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;This template detects subpages in all namespaces, including those without the MediaWiki subpage feature enabled.&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;== Alternatives for simpler text ==&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;== Alternatives for simpler text ==&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-l48&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&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;:: &amp;lt;nowiki&amp;gt; | {{template sandbox notice}}&amp;lt;/nowiki&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;:: &amp;lt;nowiki&amp;gt; | {{template sandbox notice}}&amp;lt;/nowiki&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;div&gt;: &amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&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;: &amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&lt;/div&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;That simple logic works because &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/del&gt;Template:Template sandbox notice&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]] &lt;/del&gt;also checks the page name for &quot;/sandbox&quot; before displaying the sandbox notice; otherwise, any other subpage would show no extra text. By avoiding a template, and using a single &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;, then the processing uses only +2 expansion depth levels, rather than +7 levels, and avoids &quot;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[&lt;/del&gt;wp:exceeded template limits&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;]]&lt;/del&gt;&quot; inside a complex /doc page.&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;That simple logic works because Template:Template sandbox notice also checks the page name for &quot;/sandbox&quot; before displaying the sandbox notice; otherwise, any other subpage would show no extra text. By avoiding a template, and using a single &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;, then the processing uses only +2 expansion depth levels, rather than +7 levels, and avoids &quot;wp:exceeded template limits&quot; inside a complex /doc page.&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=5553&amp;oldid=prev</id>
		<title>Matt at 09:47, 9 April 2025</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=5553&amp;oldid=prev"/>
		<updated>2025-04-09T09:47:15Z</updated>

		<summary type="html">&lt;p&gt;&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 05:47, 9 April 2025&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-l26&quot;&gt;Line 26:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 26:&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;Regardless of where the above is placed, it will return: {{When on basepage|(basepage result)|(subpage result)|page=User:Example/test}}&amp;lt;br/&amp;gt;(because &amp;quot;User:Example/test&amp;quot; is a subpage). The page doesn&amp;#039;t have to exist.&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;Regardless of where the above is placed, it will return: {{When on basepage|(basepage result)|(subpage result)|page=User:Example/test}}&amp;lt;br/&amp;gt;(because &amp;quot;User:Example/test&amp;quot; is a subpage). The page doesn&amp;#039;t have to exist.&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;If &#039;&#039;page&#039;&#039; is left empty ({{para|page}}) or undefined, the page where the template is transcluded (i.e. &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{tld|PAGENAME}}&lt;/del&gt;) is used.&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;If &#039;&#039;page&#039;&#039; is left empty ({{para|page}}) or undefined, the page where the template is transcluded (i.e. ) is used.&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;&amp;#039;&amp;#039;page&amp;#039;&amp;#039; also accepts variables, e.g. {{nowrap|{{tlf|When on basepage |(basepage result) |(subpage result) |page&amp;lt;nowiki&amp;gt;={{{page|}}}&amp;lt;/nowiki&amp;gt;&amp;amp;nbsp;}}}}&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;&amp;#039;&amp;#039;page&amp;#039;&amp;#039; also accepts variables, e.g. {{nowrap|{{tlf|When on basepage |(basepage result) |(subpage result) |page&amp;lt;nowiki&amp;gt;={{{page|}}}&amp;lt;/nowiki&amp;gt;&amp;amp;nbsp;}}}}&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-l49&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&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;: &amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&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;: &amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&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;div&gt;That simple logic works because [[Template:Template sandbox notice]] also checks the page name for &amp;quot;/sandbox&amp;quot; before displaying the sandbox notice; otherwise, any other subpage would show no extra text. By avoiding a template, and using a single &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;, then the processing uses only +2 expansion depth levels, rather than +7 levels, and avoids &amp;quot;[[wp:exceeded template limits]]&amp;quot; inside a complex /doc page.&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;That simple logic works because [[Template:Template sandbox notice]] also checks the page name for &amp;quot;/sandbox&amp;quot; before displaying the sandbox notice; otherwise, any other subpage would show no extra text. By avoiding a template, and using a single &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;, then the processing uses only +2 expansion depth levels, rather than +7 levels, and avoids &amp;quot;[[wp:exceeded template limits]]&amp;quot; inside a complex /doc page.&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== See also ==&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;* {{tlx|Ns has subpages}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=5470&amp;oldid=prev</id>
		<title>Matt at 08:33, 9 April 2025</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=5470&amp;oldid=prev"/>
		<updated>2025-04-09T08:33:36Z</updated>

		<summary type="html">&lt;p&gt;&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 04:33, 9 April 2025&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-l52&quot;&gt;Line 52:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 52:&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;== See also ==&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;== See also ==&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;div&gt;* {{tlx|Ns has subpages}}&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;* {{tlx|Ns has subpages}}&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Namespace and pagename-detecting templates}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&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;&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1511&amp;oldid=prev</id>
		<title>Matt at 21:24, 5 March 2025</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1511&amp;oldid=prev"/>
		<updated>2025-03-05T21:24:54Z</updated>

		<summary type="html">&lt;p&gt;&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 17:24, 5 March 2025&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-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&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;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{wikipedia|page name}}&lt;/ins&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;div&gt;{{Documentation subpage}}&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;{{Documentation subpage}}&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;div&gt;&amp;lt;!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--&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;&amp;lt;!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1292&amp;oldid=prev</id>
		<title>Matt: Protected &quot;Template:When on basepage/doc&quot;: Initial wiki setup ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1292&amp;oldid=prev"/>
		<updated>2025-03-05T20:34:36Z</updated>

		<summary type="html">&lt;p&gt;Protected &amp;quot;&lt;a href=&quot;/view/Template:When_on_basepage/doc&quot; title=&quot;Template:When on basepage/doc&quot;&gt;Template:When on basepage/doc&lt;/a&gt;&amp;quot;: Initial wiki setup ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite))&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:34, 5 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
	<entry>
		<id>https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1083&amp;oldid=prev</id>
		<title>Matt: Created page with &quot;{{Documentation subpage}} &lt;!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see Wikipedia:Wikidata)--&gt;  This is the {{tl|When on basepage}} meta-template. It helps other templates detect if they are on a &#039;&#039;&#039;basepage&#039;&#039;&#039; (i.e. a page whose name matches the pattern &quot;&#039;&#039;x&#039;&#039;:&#039;&#039;x&#039;&#039;&quot;) &#039;&#039;&#039;subpage&#039;&#039;&#039; (&quot;&#039;&#039;x&#039;&#039;:&#039;&#039;x&#039;&#039;/&#039;&#039;x&#039;&#039;&quot;) or &#039;&#039;&#039;subsubpage&#039;&#039;&#039; (&quot;&#039;&#039;x&#039;&#039;:&#039;&#039;x&#039;&#039;/&#039;&#039;x&#039;&#039;/&#039;&#039;x&#039;&#039;&quot;).  An alternative way to detect whether a page is a subpage is to com...&quot;</title>
		<link rel="alternate" type="text/html" href="https://poets.wiki/view/index.php?title=Template:When_on_basepage/doc&amp;diff=1083&amp;oldid=prev"/>
		<updated>2025-03-05T19:15:31Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Documentation subpage}} &amp;lt;!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see &lt;a href=&quot;https://en.wikipedia.org/wiki/Wikidata&quot; class=&quot;extiw&quot; title=&quot;wikipedia:Wikidata&quot;&gt;Wikipedia:Wikidata&lt;/a&gt;)--&amp;gt;  This is the {{tl|When on basepage}} meta-template. It helps other templates detect if they are on a &amp;#039;&amp;#039;&amp;#039;basepage&amp;#039;&amp;#039;&amp;#039; (i.e. a page whose name matches the pattern &amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) &amp;#039;&amp;#039;&amp;#039;subpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) or &amp;#039;&amp;#039;&amp;#039;subsubpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;).  An alternative way to detect whether a page is a subpage is to com...&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;!--Categories where indicated at the bottom of this page, please; interwikis at Wikidata (see [[Wikipedia:Wikidata]])--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the {{tl|When on basepage}} meta-template. It helps other templates detect if they are on a &amp;#039;&amp;#039;&amp;#039;basepage&amp;#039;&amp;#039;&amp;#039; (i.e. a page whose name matches the pattern &amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) &amp;#039;&amp;#039;&amp;#039;subpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;) or &amp;#039;&amp;#039;&amp;#039;subsubpage&amp;#039;&amp;#039;&amp;#039; (&amp;quot;&amp;#039;&amp;#039;x&amp;#039;&amp;#039;:&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;/&amp;#039;&amp;#039;x&amp;#039;&amp;#039;&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
An alternative way to detect whether a page is a subpage is to combine the parser functions &amp;lt;code&amp;gt;#ifeq:&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#titleparts&amp;lt;/code&amp;gt;. See [[#Alternatives for simpler text|Alternatives for simpler text]] below.&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
: {{tlx|When on basepage&amp;amp;#32;|&amp;#039;&amp;#039;result if on a basepage&amp;#039;&amp;#039;&amp;amp;#32;(|&amp;#039;&amp;#039;result if on a subpage&amp;#039;&amp;#039;)&amp;amp;#32;(|&amp;#039;&amp;#039;result if on a subsubpage&amp;#039;&amp;#039;)&amp;amp;#32;(|page{{=}}&amp;#039;&amp;#039;pagename&amp;#039;&amp;#039;)}}&lt;br /&gt;
&lt;br /&gt;
For example, {{tlf|When on basepage |Basepage |Subpage}} on the page &amp;quot;User:Example&amp;quot; would return: {{When on basepage|Basepage|Subpage|page=User:Example}}&amp;lt;br/&amp;gt;whilst on &amp;quot;User:Example/page&amp;quot; (or &amp;quot;User:Example/page/page&amp;quot;, &amp;quot;User:Example/page/page/page&amp;quot;, etc.) it would return: {{When on basepage|Basepage|Subpage|page=User:Example/page}}&lt;br /&gt;
&lt;br /&gt;
On a subsubpage such as &amp;quot;User:Example/page/page&amp;quot; (or &amp;quot;User:Example/page/page/page&amp;quot;, etc.), {{nowrap|{{tlf|When on basepage |Basepage |Subpage |Subsubpage}}}} would return: {{When on basepage |Basepage |Subpage |Subsubpage |page=User:Example/page/page}}&lt;br /&gt;
&lt;br /&gt;
Use an empty parameter to specify no action for a particular type of page. {{nowrap|{{tlf|When on basepage |Basepage | |Subsubpage}}}} on &amp;quot;User:Example/page&amp;quot;, for example, would return nothing, but would return &amp;quot;Subsubpage&amp;quot; if on &amp;quot;User:Example/page/page&amp;quot;, &amp;quot;User:Example/page/page/page&amp;quot;, etc. (and &amp;quot;Basepage&amp;quot; if on &amp;quot;User:Example&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
===Handling equals-signs (&amp;quot;=&amp;quot;)===&lt;br /&gt;
Use numbered parameters if their values include equals-signs (&amp;quot;=&amp;quot;), i.e.&lt;br /&gt;
: {{tlf|When on basepage&amp;amp;#32;|1{{=}}&amp;#039;&amp;#039;basepage result&amp;#039;&amp;#039; (|2{{=}}&amp;#039;&amp;#039;subpage result&amp;#039;&amp;#039;) (|3{{=}}&amp;#039;&amp;#039;subsubpage result&amp;#039;&amp;#039;)}}&lt;br /&gt;
&lt;br /&gt;
===&amp;#039;&amp;#039;page&amp;#039;&amp;#039; parameter===&lt;br /&gt;
The &amp;#039;&amp;#039;page&amp;#039;&amp;#039; parameter is included for testing/demonstration. For example:&lt;br /&gt;
: {{tlf|When on basepage&amp;amp;#32;|(basepage result) |(subpage result) |page{{=}}User:Example/test}}&lt;br /&gt;
Regardless of where the above is placed, it will return: {{When on basepage|(basepage result)|(subpage result)|page=User:Example/test}}&amp;lt;br/&amp;gt;(because &amp;quot;User:Example/test&amp;quot; is a subpage). The page doesn&amp;#039;t have to exist.&lt;br /&gt;
&lt;br /&gt;
If &amp;#039;&amp;#039;page&amp;#039;&amp;#039; is left empty ({{para|page}}) or undefined, the page where the template is transcluded (i.e. {{tld|PAGENAME}}) is used.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;page&amp;#039;&amp;#039; also accepts variables, e.g. {{nowrap|{{tlf|When on basepage |(basepage result) |(subpage result) |page&amp;lt;nowiki&amp;gt;={{{page|}}}&amp;lt;/nowiki&amp;gt;&amp;amp;nbsp;}}}}&lt;br /&gt;
&lt;br /&gt;
== Technical note ==&lt;br /&gt;
&lt;br /&gt;
This template detects subpages in all namespaces, including those without the [[meta:Link#Subpage feature|MediaWiki subpage feature]] enabled.&lt;br /&gt;
&lt;br /&gt;
== Alternatives for simpler text ==&lt;br /&gt;
&lt;br /&gt;
A subpage can be detected without using another template, by instead using the title-splitting parser function &amp;lt;code&amp;gt;#titleparts&amp;lt;/code&amp;gt; with &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#ifeq:{{#titleparts:{{PAGENAME}}|1|1}}|{{PAGENAME}}&lt;br /&gt;
 | [...code if on a basepage...]&lt;br /&gt;
 | [...code if on a subpage...]&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
For example, many templates can check if the page is a /sandbox version, by the similar markup with &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;#titleparts&amp;lt;/code&amp;gt;:&lt;br /&gt;
: &amp;lt;nowiki&amp;gt;{{#ifeq: {{#titleparts:{{PAGENAME}}|1|1}} | {{PAGENAME}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:: &amp;lt;nowiki&amp;gt; | {{documentation}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
:: &amp;lt;nowiki&amp;gt; | {{template sandbox notice}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
: &amp;lt;nowiki&amp;gt;}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
That simple logic works because [[Template:Template sandbox notice]] also checks the page name for &amp;quot;/sandbox&amp;quot; before displaying the sandbox notice; otherwise, any other subpage would show no extra text. By avoiding a template, and using a single &amp;lt;code&amp;gt;#ifeq&amp;lt;/code&amp;gt;, then the processing uses only +2 expansion depth levels, rather than +7 levels, and avoids &amp;quot;[[wp:exceeded template limits]]&amp;quot; inside a complex /doc page.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* {{tlx|Ns has subpages}}&lt;br /&gt;
{{Namespace and pagename-detecting templates}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
&amp;lt;!--Categories below this line, please; interwikis at Wikidata--&amp;gt;&lt;br /&gt;
[[Category:Pagename manipulation templates]]&lt;br /&gt;
[[Category:Wikipedia metatemplates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Matt</name></author>
	</entry>
</feed>