Template:Linkless exists: Difference between revisions
m (Changed protection settings for "Template:Linkless exists": Highly visible template ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
Bongolium500 (talk | contribs) No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
{{#if:{{PROTECTIONEXPIRY:edit|{{{1|}}}}}|{{{2|true}}}|{{{3|}}}}}<noinclude>{{documentation}}</noinclude> | {{#if:{{PROTECTIONEXPIRY:edit|{{{1|}}}}}|{{{2|true}}}|{{{3|}}}}}<noinclude>{{documentation}}[[Category:Coding utility templates]]</noinclude> |
Latest revision as of 18:09, 22 June 2024
true
Usage[[edit source]]
The template requires one parameter: the name of the page to be checked. Include a namespace where necessary. There are two other optional parameters: the text to appear if the page is present, and the text to appear if it is absent. By default, these are set to "true" and "", which evaluate as true and false respectively within expressions. {{Linkless exists|Main Page|working|broken}} is an efficient shortcut for {{#if:{{Linkless exists|Main Page}}|working|broken}}
.
TemplateData[[edit source]]
Linkless exists checks whether a page exists without recording a wikilink or transclusion
Parameter | Description | Type | Status | |
---|---|---|---|---|
1 | 1 | The name of the page to be checked | String | required |
2 | 2 | The text to appear if the page is present
| String | optional |
3 | 3 | The text to appear if the page is absent
| String | optional |