1,131
edits
No edit summary |
No edit summary |
||
| Line 293: | Line 293: | ||
if onmain() then | |||
local a1 = ret:param('all') | |||
local a2 = ret:categoryData() | |||
ret:wikitext(addcategories(a1, a2)) | |||
end | |||
ret:finish() | ret:finish() | ||
| Line 306: | Line 304: | ||
end | end | ||
function addcategories(args, catargs) | function addcategories(args, catargs) | ||
local ret = { 'Items' } | local ret = { 'Items' } | ||
| Line 389: | Line 386: | ||
-- combine table and format category wikicode | -- combine table and format category wikicode | ||
for i, v in ipairs(ret) do | for i, v in ipairs(ret) do | ||
ret[i] = string.format('[[Category:%s]]', v) | |||
end | |||
return table.concat(ret, '') | return table.concat(ret, '') | ||
end | end | ||
return p | return p | ||