Content deleted Content added
Removing {{#tag:ref ... }} |
For lead, ignore all but the first unnamed argument |
||
Line 95:
end
-- Shared template invocation code for lead and random functions
-- Entry point for template callers using #invoke:▼
function p.
-- args = { 1,2,... = page
local args = frame.args -- from calling module
local pargs = frame:getParent().args -- from template
local pagenames = { args[1] or pargs[1] } -- For lead, ignore all but the first unnamed argument
-- Accept any number of page names. If more than one, we'll pick one randomly▼
if israndom then
for i, p in pairs(args) do
if p and type(i) == 'number' and i > 1 then table.insert(pagenames, p) end if p and type(i) == 'number' and i > 1 and not args[i] then table.insert(pagenames, p) end
end▼
end
Line 120 ⟶ 122:
end
function p.lead(frame) return p.leadrandom(frame, false) end
function p.random(frame) return p.leadrandom(frame, true) end
▲end
return p
|