Content deleted Content added
S.A. Julio (talk | contribs) change parameter names |
S.A. Julio (talk | contribs) allow for section transclusion |
||
Line 1:
-- Module to build tables for aggregated match results in sports
-- See documentation for details
local p = {}
Line 160 ⟶ 163:
function p.main(frame)
local args = require'Module:Arguments'.getArgs(frame, {trim = true})
-- Check for section transclusion
local tsection = frame:getParent().args['transcludesection'] or frame:getParent().args['section'] or ''
local bsection = args['section'] or ''
if tsection ~= '' and bsection ~= '' then
if tsection ~= bsection then
return '' -- Return an empty string if sections don't match
end
end
local root = mw.html.create()
local matchType = (args.type == 'WNT' or args.type == 'MNT') and 'NT' or (args.type or 'club') -- Set default match type to 'club'
|