This module detects if a given page is a disambiguation page.
{{#invoke:Disambiguation|isDisambiguationPage|Page title}}
returns yes
if the page is a disambiguation page, or nothing if the page is not a disambiguation page
Examples:
<nowiki>{{#invoke:Disambiguation|isDisambiguationPage|</nowiki>[[Paris]]}}
→<nowiki>{{#invoke:Disambiguation|isDisambiguationPage|</nowiki>[[New]]}}
→<nowiki>{{#invoke:Disambiguation|isDisambiguationPage|</nowiki>[[Black swan (disambiguation)]]}}
→You can also use magic words like :
<nowiki>{{#invoke:Disambiguation|isDisambiguationPage|{{SUBJECTPAGENAME}}</nowiki>}}
→Import this module, e.g withisDisambiguation
and _isDisambiguationPage
.
If you have already have a Title object for the page to check, get the content using the title object's getContent method, and pass that into isDisambiguation
:
(where content
is a string, the wikitext content of page to check)
If you don't otherwise need the title, you can pass in the page name to _isDisambiguationPage
:
(where pageName
is a string, the name of page to check)