Module:Transcludable section
Appearance
This module may be used to create selectively transcluded sections using syntax which is compatible with Module:Sports table, Module:Sports results, Module:Football box, and Module:Football box collapsible.
-- Module to create selectively transcluded sections using syntax which is
-- compatible with [[Module:Sports table]] and [[Module:Sports results]]
require('Module:No globals')
local p = {}
-- Main function
function p.main(frame)
-- Declare locals
local tsection = frame:getParent().args['transcludesection'] or ''
local bsection = frame.args['section'] or frame.args['1'] or ''
-- Exit early if we are using section transclusion for a different section
if( tsection ~= '' and bsection ~= '' ) then
if( tsection ~= bsection ) then
return ''
end
end
return frame.args['text'] or ''
end
return p