Module:infobox: Difference between revisions

no edit summary
(Created page with "local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[...")
 
No edit summary
Line 349: Line 349:
for _, s in ipairs(empty_row_categories) do
for _, s in ipairs(empty_row_categories) do
root:wikitext(s)
root:wikitext(s)
end
end
-- Render tracking categories. args.decat == turns off tracking categories.
local function renderTrackingCategories()
if args.decat == 'yes' then return end
if args.child == 'yes' then
if args.title then
root:wikitext(
'[[Category:Pages which use embedded infobox templates with the title parameter]]'
)
end
elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then
root:wikitext('[[Category:Articles which use infobox templates with no data rows]]')
end
end
end
end
Line 440: Line 426:
renderItalicTitle()
renderItalicTitle()
renderEmptyRowCategories()
renderEmptyRowCategories()
renderTrackingCategories()


return loadTemplateStyles() .. tostring(root)
return loadTemplateStyles() .. tostring(root)