Template:String on page

0

Template documentation[view · edit · history · purge]
This documentation is transcluded from Template:String on page/doc.
Category:Main message boxesCategory:Lua String-based templates

Usage

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

  • 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

Category:Lua String-based templates Category:String manipulation templates