Module:Navbox: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 73: | Line 73: | ||
function p._navbox(args) | function p._navbox(args) | ||
local title = args["Title"] | local title = args["Title"] | ||
local rows = args["Rows"] | local rows = args["Rows"] | ||
local is_collapsible = args["Is Collapsible"] -- Not implemented | local is_collapsible = args["Is Collapsible"] -- Not implemented | ||
local is_collapsed = args["Is | local is_collapsed = args["Is Collapsed" ] -- Not working? | ||
-- Start of table | -- Start of table | ||
local navbox = p.navbox_title(title, is_collapsible, is_collapsed | local navbox = p.navbox_title(title, is_collapsible, is_collapsed) | ||
for i = 1, #rows do | for i = 1, #rows do | ||
Line 99: | Line 98: | ||
-- Prepropress boolean args | -- Prepropress boolean args | ||
args["Is Collapsible" ] = yesno(args["Is Collapsible" ]) | args["Is Collapsible" ] = yesno(args["Is Collapsible" ]) | ||
args["Is | args["Is Collapsed" ] = yesno(args["Is Collapsed" ]) | ||
-- Preprocess individual entries for, headers, data, and is-row-child into | -- Preprocess individual entries for, headers, data, and is-row-child into | ||
Line 115: | Line 113: | ||
row = { | row = { | ||
["Header"] = header, | ["Header"] = header, | ||
["Data"] = data, | ["Data"] = ((header ~= nil and data == nil) and "" or data), | ||
["Is Navbox"] = is_navbox | ["Is Navbox"] = is_navbox | ||
} | } |