Module:CheckCategory

local p = {}

function p.isInCategory(frame) local category = frame.args[1] local title = mw.title.getCurrentTitle -- Fetch the list of pages in the category local categoryPages = mw.category.members(category) for _, page in ipairs(categoryPages) do       if page.title == title.fullText then return "PAGE IN Category" end end return "PAGE NOT IN Category" end

return p