Is there a simple way in wikitext (or Lua) to detect that a particular page is a disambiguation page? In particular, a WikiProject banner in the talk page (on Wikipedia) can already detect if the subject page is a redirect, but I would also like to detect if the subject page is a disambiguation page. Perhaps a new hook/tag can be added, e.g. #getdisambiguation:pagename.
Topic on Extension talk:Disambiguator/Flow
There is an explicit function in Lua which will recognize whether any page is a redirect.
There is no similar feature for disambig, but might be implemented one day in similar way.
Until far future, it is possible in Lua to read source text of page in doubt, and search for specific template name used to declare disambig. This will work pretty robust per project.