Module:Other uses of: Difference between revisions
Jump to navigation
Jump to search
m (1 revision imported) |
(No difference)
|
Latest revision as of 05:26, 19 December 2019
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().prefixedText
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