Module:Ref: Difference between revisions

From Halopedia, the Halo wiki

No edit summary
No edit summary
Line 29: Line 29:


function makeReuse( frame, id, group )
function makeReuse( frame, id, group )
local args = {}
if id == nil or id == '' then
return utils.error(
'No id was specified for ref reuse!',
'ref',
'Pages containing missing template parameter errors' )
else
args.name = tostring( id )
end
if group ~= nil and group ~= '' then
args.group = tostring( group )
end
return frame:extensionTag( 'ref', '', args )
end
function makeList( frame, id, group )
local args = {}
local args = {}
if group ~= nil and group ~= '' then
if group ~= nil and group ~= '' then
Line 36: Line 52:
return frame:extensionTag( 'references', '', args )
return frame:extensionTag( 'references', '', args )
end
end


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Line 54: Line 71:
local templateFrame = frame:getParent()
local templateFrame = frame:getParent()
local group = templateFrame.args['Group']
local group = templateFrame.args['Group']
local colNum = templateFrame.args['Columns']
local colWidth = templateFrame.args['ColWidth']
local colGap = templateFrame.args['ColGap']
return makeList( frame, group, colNum, colWidth, colGap )
return makeList( frame, group, colNum, colWidth, colGap )
end
end