Module:SiteList: Difference between revisions

522 bytes removed ,  22 July 2023
no edit summary
No edit summary
No edit summary
)
 
local ns = mw.title.getCurrentTitle().namespace
if ns == 0 then
if type(site.category) == "table" then
result = result .. '[[Category:Articles in the mainspace using Template:SiteList]]'
elseif ns == 2 then
if type(site.category) == "table" then
for _, cat in pairs(site.category) do
result = result .. '[[Category:' .. cat .. ']]'
end
else
result = result .. '[[Category:' .. site.category .. ']]'
end
result = result .. '[[Category:Articles in the userspace using Template:SiteList]]'
elseif ns == 118 then
if type(site.category) == "table" then
for _, cat in pairs(site.category) do
result = result .. '[[Category:' .. cat .. ']]'
end
else
result = result .. '[[Category:' .. site.category .. ']]'
end
result = result .. '[[Category:Drafts using Template:SiteList]]'
end