Module:POTD transcluder explained

local p =

function p.transclude(frame) local page = frame.args[1] or error('No page was specified') local wikitext = mw.title.new(page):getContent if wikitext

nil then return ' does not exist' end local n = string.match(wikitext, '^') if n

nil then n = string.match(wikitext, '^') end if n

nil then return frame:expandTemplate end local t = for i = 1, tonumber(n) do t[i] = frame:expandTemplate end return table.concat(t, "\n")end

return p