440
edits
(Updated from sandbox: categorizes as unusual "other uses" by defaulting as well as typed-out "other uses") |
m (15 revisions imported from templatewiki:Module:For) |
||
(5 intermediate revisions by 5 users not shown) | |||
Line 1:
local mArguments --initialize lazily
local yesno = require('Module:Yesno')▼
local mHatlist = require('Module:Hatnote list')
local mHatnote = require('Module:Hatnote')
local p = {}
Line 15:
function p._For (args)
local use = args[1]
if (not use) then
return mHatnote.makeWikitextError(
'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.',
'Template:For#Errors',
category = '[[Category:Hatnote templates using unusual parameters]]'▼
args.category
)
end
local pages = {}
Line 26 ⟶ 28:
mHatlist.forSeeTableToString({{use = use, pages = pages}}),
{selfref = args.selfref}
) ..
(use == 'other uses') and yesNo(args.category) and
)
end
|