Content deleted Content added
Andy M. Wang (talk | contribs) Create sandbox version of Module:Airport destination list |
Andy M. Wang (talk | contribs) add 4thcoltitle (?) |
||
Line 7:
function p.table(frame)
local args = (frame.args[1] ~= nil) and frame.args or frame:getParent().args
local cols
local cols = isnotempty(args['3rdcoltitle']) and 3 or 2▼
if isempty(args['4thcoltitle']) then
elseif isnotempty(args['3rdcoltitle']) then
cols = 3
else
cols = 2 -- just pick up 2, since 3rdcoltitle does not exist
end
-- compute the maximum cell index
Line 34 ⟶ 41:
cell:wikitext('Destinations')
if (isnotempty(args['3rdcoltitle'])) then
cell= row:tag('th')
cell:css('width','10%')
cell:wikitext(args['3rdcoltitle'])
end
if (isnotempty(args['4thcoltitle'])) then
cell= row:tag('th')
cell:css('width','10%')
|