Template:InternalLinkCounter/doc

From Wikipedia, the free encyclopedia

Usage[edit]

This template has only one parameter and can insert a wikitext, and returns only the number of blue and red internal links (excluding external links) in the given text. Returns "0" if there is no internal link. This can be used with other templates, ParserFunctions and singular and plural cases.

Examples[edit]

  • {{InternalLinkCounter|[[Wikipedia]]}} → 1
  • {{InternalLinkCounter|[[Wikipedia]] and [[Wiktionary]]}} → 2

Does not count external links and empty internal links:

  • {{InternalLinkCounter|[https://en.wikipedia.org Wikipedia] and [[]]}} → 0

The following shows examples of some articles and number of their internal link(s). Unintentionally "Full article..." link counted too. Purge

See also[edit]

  • {{Counter}} – To count the parameters of a template
  • {{Word count}} – To count number of words