<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ADisambiguation%2Fdoc</id>
	<title>Module:Disambiguation/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://battleint.net/index.php?action=history&amp;feed=atom&amp;title=Module%3ADisambiguation%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Disambiguation/doc&amp;action=history"/>
	<updated>2026-04-25T14:53:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://battleint.net/index.php?title=Module:Disambiguation/doc&amp;diff=176626&amp;oldid=prev</id>
		<title>imported&gt;Deadfire: updating</title>
		<link rel="alternate" type="text/html" href="https://battleint.net/index.php?title=Module:Disambiguation/doc&amp;diff=176626&amp;oldid=prev"/>
		<updated>2024-11-08T21:59:44Z</updated>

		<summary type="html">&lt;p&gt;updating&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{lua|Module:Redirect}}&lt;br /&gt;
This module detects if a given page is a disambiguation page.&lt;br /&gt;
&lt;br /&gt;
==Usage==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{{#invoke:Disambiguation|isDisambiguationPage|Page title}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
:returns &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; if the page is a disambiguation page, or nothing if the page is not a disambiguation page&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Disambiguation|isDisambiguationPage|&amp;lt;/nowiki&amp;gt;[[Paris]]}}&amp;lt;/code&amp;gt; → {{#invoke:Disambiguation|isDisambiguationPage|Paris}}&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Disambiguation|isDisambiguationPage|&amp;lt;/nowiki&amp;gt;[[New]]}}&amp;lt;/code&amp;gt; → {{#invoke:Disambiguation|isDisambiguationPage|New}}&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Disambiguation|isDisambiguationPage|&amp;lt;/nowiki&amp;gt;[[Black swan (disambiguation)]]}}&amp;lt;/code&amp;gt; → {{#invoke:Disambiguation|isDisambiguationPage|Black swan (disambiguation)}}&lt;br /&gt;
You can also use magic words like {{tl|SUBJECTPAGENAME}}:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#invoke:Disambiguation|isDisambiguationPage|{{SUBJECTPAGENAME}}&amp;lt;/nowiki&amp;gt;}}&amp;lt;/code&amp;gt; → {{#invoke:Disambiguation|isDisambiguationPage|{{SUBJECTPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
===Usage within Lua modules===&lt;br /&gt;
Import this module, e.g with&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mDisambiguation = require(&amp;#039;Module:Disambiguation&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
Then you can use the functions &amp;lt;code&amp;gt;isDisambiguation&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;_isDisambiguationPage&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you have already have a [[mw:Lua_reference_manual#Title_objects|Title object]] for the page to check, get the content using the title object&amp;#039;s getContent() method, and pass that into &amp;lt;code&amp;gt;isDisambiguation&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isDab = mDisambiguation.isDisambiguation(content) -- returns true or false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:(where &amp;lt;code&amp;gt;content&amp;lt;/code&amp;gt; is a string, the wikitext content of page to check)&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t otherwise need the title, you can pass in the page name to &amp;lt;code&amp;gt;_isDisambiguationPage&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local isDab = mDisambiguation._isDisambiguationPage(pageName) -- returns true or false&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
:(where &amp;lt;code&amp;gt;pageName&amp;lt;/code&amp;gt; is a string, the name of page to check)&lt;br /&gt;
&lt;br /&gt;
===Internal operations===&lt;br /&gt;
* As this module relies on detecting templates with names like &amp;quot;disambiguation&amp;quot; in the article text, it is subject to false positives by templates such as {{tl|italic disambiguation}}. These templates should be added to the falsePositives list in the code to exclude them.&lt;br /&gt;
* The list of disambiguation templates is maintained at [[Module:Disambiguation/templates]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Sandbox other||&lt;br /&gt;
[[Category:Disambiguation and redirection templates]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
[[Category:Module documentation pages]]&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&lt;/div&gt;</summary>
		<author><name>imported&gt;Deadfire</name></author>
	</entry>
</feed>