<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AOther_uses%2Fdoc</id>
	<title>Module:Other uses/doc - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://moasspedia.org/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AOther_uses%2Fdoc"/>
	<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:Other_uses/doc&amp;action=history"/>
	<updated>2026-04-08T23:45:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://moasspedia.org/w/index.php?title=Module:Other_uses/doc&amp;diff=2794&amp;oldid=prev</id>
		<title>Wikipedia&gt;WOSlinker: change source to syntaxhighlight</title>
		<link rel="alternate" type="text/html" href="https://moasspedia.org/w/index.php?title=Module:Other_uses/doc&amp;diff=2794&amp;oldid=prev"/>
		<updated>2020-07-07T13:23:54Z</updated>

		<summary type="html">&lt;p&gt;change source to syntaxhighlight&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) --&amp;gt;&lt;br /&gt;
{{high-risk|111000+}}&lt;br /&gt;
{{Module rating|protected}}&lt;br /&gt;
This module produces an &amp;quot;other uses&amp;quot; hatnote for linking to disambiguation pages. It implements the {{tl|other uses}} template.&lt;br /&gt;
&lt;br /&gt;
== Usage from wikitext==&lt;br /&gt;
===otheruses()===&lt;br /&gt;
The &amp;lt;code&amp;gt;otheruses()&amp;lt;/code&amp;gt; function directly implements {{tl|other uses}} and probably shouldn&amp;#039;t be used anywhere else.&lt;br /&gt;
&lt;br /&gt;
===otherX()===&lt;br /&gt;
The &amp;lt;code&amp;gt;otherX()&amp;lt;/code&amp;gt; function allows direct implementation of templates that differ from {{tl|other uses}} in only phrasing. For example, where {{tl|other uses}} is phrased with &amp;quot;other uses&amp;quot;, {{tl|other places}} is phrased with &amp;quot;other places with the same name&amp;quot; and can be implemented using &amp;lt;code&amp;gt;otherX()&amp;lt;/code&amp;gt;, which takes the custom phrasing as its parameter at the module invocation. {{tl|other places}} in particular could be implemented with this wikitext: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot;&amp;gt;{{#invoke:other uses|otherX|places with the same name}}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that the leading &amp;quot;other&amp;quot; is automatically supplied; if a template would not use this phrasing, it should not use &amp;lt;code&amp;gt;otherX()&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Usage from Lua ==&lt;br /&gt;
To use this module from Lua, first load the module:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
local mOtheruses = require(&amp;#039;Module:Other uses&amp;#039;)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The module functions can then be used through the &amp;lt;code&amp;gt;_otheruses()&amp;lt;/code&amp;gt; function:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
mOtheruses._otheruses(args, options)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Parameters of &amp;lt;code&amp;gt;_otheruses()&amp;lt;/code&amp;gt;===&lt;br /&gt;
;args&lt;br /&gt;
:A table containing strings of link text, without brackets. For example, &amp;lt;code&amp;gt;{&amp;quot;PAGE1&amp;quot;, &amp;quot;PAGE2#SECTION&amp;quot;, &amp;quot;PAGE3&amp;lt;nowiki&amp;gt;|&amp;lt;/nowiki&amp;gt;LABEL&amp;quot;}&amp;lt;/code&amp;gt;. Make sure that there are no gaps or nil values, as that can confuse the &amp;lt;code&amp;gt;mw.text.listToText()&amp;lt;/code&amp;gt; function the module uses. If in doubt, use &amp;lt;code&amp;gt;compressSparseArray()&amp;lt;/code&amp;gt; from [[Module:TableTools]]. This may be empty or nil.&lt;br /&gt;
;options&lt;br /&gt;
:A table containing a number of optional named values; you must supply at least one of &amp;lt;code&amp;gt;options.defaultPage&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;options.title&amp;lt;/code&amp;gt;; in most cases setting the latter to &amp;lt;code&amp;gt;mw.title.getCurrentTitle().prefixedText&amp;lt;/code&amp;gt; is advisable. The following options are supported:&lt;br /&gt;
:*&amp;lt;code&amp;gt;defaultPage&amp;lt;/code&amp;gt;: String; completely overrides the linked page when no arguments are supplied&lt;br /&gt;
:*&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt;: String; sets the title used before the &amp;quot;(disambiguation)&amp;quot; suffix.&lt;br /&gt;
:*&amp;lt;code&amp;gt;disambiguator&amp;lt;/code&amp;gt;: String; replaces &amp;quot;disambiguation&amp;quot; in the suffix&lt;br /&gt;
:*&amp;lt;code&amp;gt;otherText&amp;lt;/code&amp;gt;: String; replaces &amp;quot;uses&amp;quot; in &amp;quot;other uses&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{#ifeq:{{SUBPAGENAME}}|sandbox | |&lt;br /&gt;
&amp;lt;!-- Categories below this line, please; interwikis at Wikidata --&amp;gt;&lt;br /&gt;
[[Category:Hatnote modules]]&lt;br /&gt;
}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;WOSlinker</name></author>
	</entry>
</feed>