Модуль:Players
Документацію для цього модуля можна створити у Модуль:Players/документація
local p = {}
function p.fetchCategoryData(frame)
local categoryName = "Учасники_спільноти_MCC" -- The category to fetch from
local category = mw.title.makeTitle(14, categoryName) -- Namespace 14 for Category
local members = category:getCategoryMembers()
local output = '{| class="wikitable sortable" style="text-align:center;"\n! Учасник\n! Page Link\n'
-- Iterate through each member of the category
for _, member in ipairs(members) do
local title = member.fullText -- Get the full text of the page title
output = output .. '|-\n| ' .. title .. '\n| [[' .. title .. ']]\n'
end
-- Close the wikitable
output = output .. '|}\n'
return output
end
return p