Jump to content

Module:Sandbox/Galobtter

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Galobtter (talk | contribs) at 05:12, 30 April 2023 (hm). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}
function p.main(frame)
	local content = mw.title.getCurrentTitle():getContent();
	hasCategory = string.find(content, "X1");
	if hasCategory then
		return frame:expandTemplate{ title = 'Notice', args = { 'This page has the category X1' } };
	else
		return content;
	end
end
return p