Template:Link if exists
Appearance
| This template is used on approximately 77,000 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. |
Usage
For use as a subtemplate of other templates. Displays the first parameter, linked if an article exists, otherwise unlinked. You can also define a parameter nsp, for the namespace to try to link to (e.g. "nsp=Category"). Use prefix instead of nsp if the prefix is also to be displayed if a link is found.
Examples
- A page which exists:
{{Link if exists|Japan}}→ Japan - A page which does not exist:
{{Link if exists|The exciting story of paint drying in a small town in Japan one day in April 1927}}→ The exciting story of paint drying in a small town in Japan one day in April 1927 - Another page which exists:
{{Link if exists|Portal:History}}→ Portal:History - A page which does not exist:
{{Link if exists|Portal:Computing in 1066}}→ Portal:Computing in 1066
See also
- {{Link if exists with link text}}
- {{Link if not current}}
- {{Category link if exists}}
- {{Linked}} – links if not already linked