Module:Sandbox/Galobtter

local p = {} function p.main(frame) local content = mw.getCurrentFrame:expandTemplate{ title = mw.title.getCurrentTitle } hasCategory = content:find("%[%[%s*[Cc]ategory:%s*X1%s*%]%]") if hasCategory then return frame:expandTemplate{ title = 'Notice', args = { 'This page has the category X1' } } end end return p