Модуль:Players: відмінності між версіями
Admin (обговорення | внесок) Немає опису редагування |
Admin (обговорення | внесок) Немає опису редагування |
||
| Рядок 2: | Рядок 2: | ||
function p.fetchCategoryData(frame) | function p.fetchCategoryData(frame) | ||
local categoryName = "Учасники_спільноти_MCC" -- | local categoryName = "Учасники_спільноти_MCC" -- Set your category name here | ||
-- | -- Use DPL to fetch pages in the category | ||
local dplQuery = '<dpl>\ncategory=' .. categoryName .. '\nordermethod=categoryadd\ncount=10\naddeditdate=true\nmode=userformat\ninclude={#invoke:Hatnote}\nsecseparators=, \n</dpl>' | |||
-- | -- Convert the DPL query into a string that can be rendered | ||
local dplResult = frame:preprocess(dplQuery) | |||
return | |||
-- Return the result to be displayed on the wiki page | |||
return dplResult | |||
end | end | ||
return p | return p | ||
Версія за 20:57, 22 квітня 2024
Документацію для цього модуля можна створити у Модуль:Players/документація
local p = {}
function p.fetchCategoryData(frame)
local categoryName = "Учасники_спільноти_MCC" -- Set your category name here
-- Use DPL to fetch pages in the category
local dplQuery = '<dpl>\ncategory=' .. categoryName .. '\nordermethod=categoryadd\ncount=10\naddeditdate=true\nmode=userformat\ninclude={#invoke:Hatnote}\nsecseparators=, \n</dpl>'
-- Convert the DPL query into a string that can be rendered
local dplResult = frame:preprocess(dplQuery)
-- Return the result to be displayed on the wiki page
return dplResult
end
return p