Module:Other uses/doc

From MattWiki
Jump to navigation Jump to search

This is the documentation page for Module:Other uses

This module produces an "other uses" hatnote for linking to disambiguation pages. It implements the {{other uses}} template.

Usage from wikitext

This module cannot be used directly from wikitext. Please use the {{other uses}} template instead.

Usage from Lua

To use this module from Lua, first load the module:

local mOtheruses = require('Module:Other uses')

The module can then be used with the following syntax:

mOtheruses._otheruses(args, options)


A table containing strings of link text, without brackets. For example, {"PAGE1", "PAGE2#SECTION", "PAGE3|LABEL"}. Make sure that there are no gaps or nil values, as that can confuse the mw.text.listToText() function the module uses. If in doubt, use compressSparseArray() from Module:TableTools. This may be empty or nil.
A table containing a number of optional named values; you must supply at least one of options.defaultPage or options.title; in most cases setting the latter to mw.title.getCurrentTitle().text is advisable. The following options are supported:
  • defaultPage: String; completely overrides the linked page when no arguments are supplied
  • title: String; sets the title used before the "(disambiguation)" suffix.
  • disambiguator: String; replaces "disambiguation" in the suffix
  • otherText: String; replaces "uses" in "other uses"