Module:Sports table: Difference between revisions

Content deleted Content added
add parsing of both args and parentargs which means we no longer need to pass (several) parameters between pages transcluding and the child page housing the table
Add a new parameter as discussed at my talkpage and tested in sandbox
Line 468:
table.insert(t_footer,'Updated to '..matches_text..' played on '..update..'. ')
end
-- Stack footer or not
local stack_footer_val = firstnonblank(Pargs['stack_footer'], Args['stack_footer']) or 'no'
local footer_break = false
if yesno(stack_footer_val) then footer_break = true end
-- Variable for linebreak
local stack_string = '<br>'
if footer_break then table.insert(t_footer,stack_string) end
table.insert(t_footer,'Source: '..source)
if class_rules and full_table and (not hide_class_rules) then
table.insert(t_footer,'<br>Rules for classification: '..class_rules)
end
-- Now for the named status
local status_exist = false
Line 479 ⟶ 491:
curr_letter = mw.ustring.upper(mw.ustring.sub(t_status.letters,jjj,jjj))
if t_status.called[curr_letter] then
if (footer_break and status_exist) then
status_string = status_string..stack_string
end
if t_status.position == 'before' then
status_string = status_string..'<span style="font-weight:bold">'..string.lower(curr_letter)..' &ndash;</span> '..t_status.code[curr_letter]..'; '