Jump to content

Template:InternalLinkCounter/doc

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Aram (talk | contribs) at 23:32, 3 May 2024 (Fixing style/layout errors). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Usage

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

  • {{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

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