Module:Infobox

From Industrial-Craft-Wiki
Revision as of 17:05, 9 April 2015 by Chocohead (talk | contribs) (Guess I can just do this on Template:Block and Template:Item)
Jump to navigation Jump to search
Template-info.png Documentation

Work around for {{Block}} and {{Item}} needing to call {{Infobox}} and add categories (Category:Blocks and Category:Items receptively) to the pages calling them.

The above documentation is transcluded from Module:Infobox/doc. (edit | history)


local p = {}

function p.block( f )
   if f == mw.getCurrentFrame() then
       args = f:getParent().args
   end
   return f:expandTemplate{ title='Infobox', args = args }
end

function p.item( f )
   if f == mw.getCurrentFrame() then
       args = f:getParent().args
   end
   return f:expandTemplate{ title='Infobox', args = args }
end

return p