Module:Navbox: Difference between revisions

143 bytes added ,  10 years ago
don't require the wrapper template
m>Jackmcbarn
(check is inverted)
m>Jackmcbarn
(don't require the wrapper template)
Line 386: Line 386:
     -- them false too.
     -- them false too.
     local args = {}
     local args = {}
     local parent_args = frame:getParent().args;
     local parentTitle = frame:getParent():getTitle()
    local frame_args = (parentTitle == 'Template:Navbox' or parentTitle == 'Template:Navbox/sandbox') and frame:getParent().args or frame.args;


     -- Out of order parsing bug.
     -- Out of order parsing bug.
     local temp;
     local temp;
     temp = parent_args.title;
     temp = frame_args.title;
     temp = parent_args.above;
     temp = frame_args.above;
     for i = 1, 20 do
     for i = 1, 20 do
         temp = parent_args["group" .. tostring(i)];
         temp = frame_args["group" .. tostring(i)];
         temp = parent_args["list" .. tostring(i)];
         temp = frame_args["list" .. tostring(i)];
     end     
     end     
     temp = parent_args.below;
     temp = frame_args.below;
      
      
     for k, v in pairs(parent_args) do
     for k, v in pairs(frame_args) do
         if v ~= '' then
         if v ~= '' then
             args[k] = v
             args[k] = v
Anonymous user