Template:String on page

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

0

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:String on page/doc.

Usage[edit]

Finds if a string (case sensitive) is used on a page or not. It has two parameters

  • {{string on page|PAGENAME|STRING}}

The template returns 1 if STRING is found on PAGENAME, and 0 STRING otherwise.

For example

  • {{string on page|Wikipedia:Bot policy|bots}} → 0
  • {{string on page|Wikipedia:Bot policy|chocolate}} 0

Limitations[edit]

  • Currently, this template only sees the text that would be transcluded (i.e. outside of <noinclude>...</noinclude> tags).
  • If you want to use the template to detect a string on the same page the template is on, it must be noincluded <noinclude>{{String on page|PAGENAME|STRING}}</noinclude>, otherwise a template loop will occur.

See also[edit]