Difference between revisions of "Module:Sports table/sub"
Jump to navigation
Jump to search
blackwiki>CRwikiCA (Proper functionality for width) |
blackwiki>CRwikiCA (One declaration only) |
||
Line 4: | Line 4: | ||
function ppp.colhead(ttt,width,text) | function ppp.colhead(ttt,width,text) | ||
-- For individual column headers | -- For individual column headers | ||
+ | local head_string | ||
if width=='auto' then | if width=='auto' then | ||
− | + | head_string = '! scope="col" |'..text..'\n' | |
else | else | ||
− | + | head_string = '! scope="col" width='..width..'|'..text..'\n' | |
end | end | ||
Revision as of 14:50, 30 October 2014
Documentation for this module may be created at Module:Sports table/sub/doc
-- Subfunctions for this module that are called from the style modules
local ppp = {}
function ppp.colhead(ttt,width,text)
-- For individual column headers
local head_string
if width=='auto' then
head_string = '! scope="col" |'..text..'\n'
else
head_string = '! scope="col" width='..width..'|'..text..'\n'
end
ttt.count = ttt.count+1
table.insert(ttt.tab_text,head_string)
return ttt
end
return ppp