• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Target of/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Target of
This is the template sandbox page for Template:Target of (diff).
See also the companion subpage for test cases.
Template documentationviewedithistorypurge
WarningThis template is used on many pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
Shortcuts
  • {{Redirects fromTemplate:Redirects from}}
  • {{Follow redirectTemplate:Follow redirect}}
  • {{Resolve redirectTemplate:Resolve redirect}}
  • {{Redirect bypassTemplate:Redirect bypass}}
This template uses Lua:
  • Module:Redirect (sandbox)

Returns the target page of a link, whether it's a redirect or not.[clarification needed]

Usage

edit
  • {{Target of|AD 2000}} 2000

The page "AD 2000" is a redirect to "2000", so it displays "2000".

  • {{Target of|2000}} 2000

The page "2000" isn't a redirect, so it displays "2000".

  • [[{{Target of|AD 2000}}]] 2000

You can use it in links, &c.

It also supports redirects to anchored sections:

  • {{Target of|WP:BRINT}} Wikipedia:Redirect#Bypass redirects in navigational templates

It can be used in "piped" local links that support alternative labels:

  • [[{{Target of|WP:BRINT}}|WP:BRINT]] WP:BRINT

See also

edit
  • {{Redirect and target}}
The above documentation is transcluded from Template:Target of/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Target_of/sandbox&oldid=959145777"