Template:HasTemplate/doc

Returns 'yes' if a given page contains a given template or an empty string otherwise.

Parameters
There are three positional parameters (with named aliases) and one named parameter:
 * 1 – name of the page (required; alias: page)
 * 2 – name of the template to search for on the page (required; alias: template)
 * 3 – ordinal number of the template; ie. means, "Do 3 (or more) of TemplateName exist?" (optional; default=; alias: N)
 * follow – if given a truthy value (E.g. ), follows redirects of PageName (optional; default is do not follow redirects)

Template data
{	"params": { "1": {			"aliases": [ "page" ],			"label": "Page", "description": "The page to check for templates in", "type": "wiki-page-name", "required": true },		"2": {			"aliases": [ "template" ],			"label": "Template", "description": "The template to look for in the target page", "type": "string", "required": true },		"3": {			"aliases": [ "N" ],			"label": "Count", "description": "How many occurrences of the template should be looked for", "type": "number", "default": "1" },		"follow": { "label": "Follow", "description": "Should the page be followed to its target if it is a redirect", "type": "boolean", "default": "no" },		"treat_as_regex": { "label": "Treat as regex", "description": "Should the template value be treated as a lua regex instead of regular text", "type": "boolean", "default": "no" }	},	"description": "Test if a certain page contains a certain template", "format": "inline", "paramOrder": [ "1",		"2",		"3",		"follow", "treat_as_regex" ] }