Module:Other uses of

From Guild of Archivists
Revision as of 05:16, 11 July 2016 by Alahmnat (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Usage

This module should neither be invoked directly nor used from Lua. Use the {{other uses of}} template instead.


local mOtheruses = require('Module:Other uses')
local p = {}
p.otherusesof = function (frame)
	function getArg (num)
		local x = frame:getParent().args[num]
		return x ~= '' and x or nil
	end
	local ofWhat = getArg(1) or mw.title.getCurrentTitle().text
	local page = getArg(2)
	local options = {
		title = ofWhat,
		otherText = string.format('uses of "%s"', ofWhat)
	}
	arg = page and {page} or {}
	return mOtheruses._otheruses(arg, options)
end
return p