Модуль:Players
Документацію для цього модуля можна створити у Модуль:Players/документація
local p = {}
function p.fetchCategoryData(frame)
local categoryName = "Учасники_спільноти_MCC" -- The category to fetch from
local count = mw.site.stats.pagesInCategory(categoryName, 'all') -- Get the number of pages
local pages = mw.site.pagesInCategory(categoryName, 'all', count) -- Fetch all pages in the category
-- Start the wikitable
local output = '{| class="wikitable sortable" style="text-align:center;"\n! Учасник\n! Page Link\n'
-- Add rows to the wikitable
for title in pages do
output = output .. '|-\n| ' .. title.fullText .. '\n| [[' .. title.fullText .. ']]\n'
end
-- Close the wikitable
output = output .. '|}\n'
return output
end
return p