Module:Other uses/doc
This module produces an "other uses" hatnote for linking to disambiguation pages. It implements the {{other uses}} template.
| This Lua module is used on many pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
This module produces an "other uses" hatnote for linking to disambiguation pages. It implements the {{other uses}} template.
Usage from wikitext
otheruses()
The otheruses() function directly implements {{other uses}} and probably shouldn't be used anywhere else.
otherX()
The otherX() function allows direct implementation of templates that differ from {{other uses}} in only phrasing. For example, where {{other uses}} is phrased with "other uses", {{other places}} is phrased with "other places with the same name" and can be implemented using otherX(), which takes the custom phrasing as its parameter at the module invocation. {{other places}} in particular could be implemented with this wikitext:
{{#invoke:other uses|otherX|places with the same name}}
Note that the leading "other" is automatically supplied; if a template would not use this phrasing, it should not use otherX().
Usage from Lua
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()
- 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.defaultPageoroptions.title; in most cases setting the latter tomw.title.getCurrentTitle().prefixedTextis 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"
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.