Module:Other uses/doc
Sarna News
- Bad ‘Mechs - Sentinel
- HEXTECH Review - Wave 3 Brings More Urban Options To Your Battlefield
- Your BattleTech News Round-Up For March, 2024
- Crashing 'Mechs With Jennifer Brozek, Author Of The Rogue Academy Trilogy
- Getting The Word Out With Rem Alternis, Catalyst Community & Marketing Director
- Read more →
This is a documentation subpage for Module:Other uses. It may contain usage information, categories and other content that is not part of the original module page. |
This module produces an "other uses" hatnote for linking to disambiguation pages. It implements the {{other uses}} template.
Contents
Usage from wikitext[edit]
otheruses()[edit]
The otheruses()
function directly implements {{other uses}} and probably shouldn't be used anywhere else.
otherX()[edit]
The otherX()
function allows direct implementation of templates that differ from {{other uses}} in only phrasing.
Note that the leading "other" is automatically supplied; if a template would not use this phrasing, it should not use otherX()
.
Usage from Lua[edit]
To use this module from Lua, first load the module:
local mOtheruses = require('Module:Other uses')
The module functions can then be used through the _otheruses()
function:
mOtheruses._otheruses(args, options)
Parameters of _otheruses()
[edit]
- args
- 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 themw.text.listToText()
function the module uses. If in doubt, usecompressSparseArray()
from Module:TableTools. This may be empty or nil. - options
- A table containing a number of optional named values; you must supply at least one of
options.defaultPage
oroptions.title
; in most cases setting the latter tomw.title.getCurrentTitle().prefixedText
is advisable. The following options are supported:defaultPage
: String; completely overrides the linked page when no arguments are suppliedtitle
: String; sets the title used before the "(disambiguation)" suffix.disambiguator
: String; replaces "disambiguation" in the suffixotherText
: String; replaces "uses" in "other uses"