Template:Iflink
{{{1}}}
Usage
Used to create active links to a page if it exists, or plain text if the page does not exist. If a target page is created then the link will become active.
This is an expensive template to run so would be used per the guidance note.
{{iflink|title=Wikisource:Style guide}}
{{iflink|Wikisource:Style guide}}
{{iflink|ns=Wikisource:|title=Style guide}}
{{iflink|ns=Wikisource:|1=Style guide}}
{{iflink|ns=Wikisource:|Style guide}}
{{iflink|Help:Cartoonists' corner}}
{{iflink|ns=Help:|1=Cartoonists' corner}}
Existing links (1st single use showing namespace, 2nd hiding namespace)
Fake links (1st single use showing namespace, 2nd hiding namespace)
- Help:Cartoonists' corner
- Cartoonists' corner
Notes
This template is only suitable for static pages or predominantly static templates as the ifexist parameter is an expensive call. As guidance this template would typically only be used in Wikisource:, Help: and Portal namespaces, typically through a complicated template. An example of use is Template:United States Executive Branch Navbox and its appending to many portal pages.
Template uses #ifexist parser function through Template:If.
Templatedata
Create links based on existence of underlying page
Parameter | Description | Type | Status | |
---|---|---|---|---|
title | title 1 | Name of the target page, can be whole title, or can be display name (use "ns" parameter if using that methodology) | Page name | required |
namespace | ns | namespace title (include colon)
| String | optional |