Difference between revisions of "Template:Count on page/doc"
Jump to navigation
Jump to search
imported>Headbomb (==Limitations== Currently, this template only sees the text that would be transcluded (i.e. outside of <code><nowiki><noinclude>...</noinclude></nowiki></code> tags.) |
imported>Headbomb (==Limitations== *Currently, this template only sees the text that would be transcluded (i.e. outside of <code><nowiki><noinclude>...</noinclude></nowiki></code> tags. *If you want to use the template to count the words on the same page the template is on, it must be noincluded <code><nowiki><noinclude>{{Count on page|PAGENAME|STRING}}</noinclude></nowiki></code> otherwise a template loop will occur.) |
||
| Line 13: | Line 13: | ||
==Limitations== | ==Limitations== | ||
| − | Currently, this template only sees the text that would be transcluded (i.e. outside of <code><nowiki><noinclude>...</noinclude></nowiki></code> tags. | + | *Currently, this template only sees the text that would be transcluded (i.e. outside of <code><nowiki><noinclude>...</noinclude></nowiki></code> tags. |
| + | *If you want to use the template to count the words on the same page the template is on, it must be noincluded <code><nowiki><noinclude>{{Count on page|PAGENAME|STRING}}</noinclude></nowiki></code> otherwise a template loop will occur. | ||
==See also== | ==See also== | ||
Revision as of 19:07, 22 August 2019
| 40px | This is a documentation subpage for Template:Count on page. It contains usage information, categories and other content that is not part of the original template page. |
| 30px | This template uses Lua: |
Usage
Finds if a string (case senstitive) is used on a page or not. It has two parameters
{{count on page|PAGENAME|STRING}}
The template returns the number of times STRING is found on PAGENAME.
For example
{{count on page|Wikipedia:Bot policy|Bots}}→ 0{{count on page|Wikipedia:Bot policy|bots}}→ 0{{count 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 count the words on the same page the template is on, it must be noincluded
<noinclude>{{Count on page|PAGENAME|STRING}}</noinclude>otherwise a template loop will occur.
See also
- {{String on page}}