Difference between revisions of "Module:List"

Jump to navigation Jump to search
491 bytes removed ,  20:12, 18 April 2020
Tracking categories don't exist on this wiki
>Minorax
m (29 revisions imported from meta:Module:List)
>Pppery
(Tracking categories don't exist on this wiki)
Line 145: Line 145:


return tostring(root)
return tostring(root)
end
function p.renderTrackingCategories(args)
local isDeprecated = false -- Tracks deprecated parameters.
for k, v in pairs(args) do
k = tostring(k)
if k:find('^item_style%d+$') or k:find('^item_value%d+$') then
isDeprecated = true
break
end
end
local ret = ''
if isDeprecated then
ret = ret .. '[[Category:List templates with deprecated parameters]]'
end
return ret
end
end


Line 172: Line 156:
checkType('makeList', 2, args, 'table')
checkType('makeList', 2, args, 'table')
local data = p.makeListData(listType, args)
local data = p.makeListData(listType, args)
local list = p.renderList(data)
return p.renderList(data)
local trackingCategories = p.renderTrackingCategories(args)
return list .. trackingCategories
end
end


Anonymous user

Navigation menu