Difference between revisions of "Template:ExistNotRedirect"
Jump to navigation
Jump to search
imported>BrownHairedGirl ({{Documentation}} Category:Redirect templates) |
imported>BrownHairedGirl |
||
| Line 1: | Line 1: | ||
{{#invoke: ExistNotRedirect | main}} | {{#invoke: ExistNotRedirect | main}} | ||
{{Documentation}} | {{Documentation}} | ||
| − | [[Category: | + | [[Category:Disambiguation and redirection templates]] |
Revision as of 17:48, 9 July 2019
| This template uses Lua: |
Checks whether a page exists and is not a redirect.
If the pagename both exists AND is not a redirect, it returns the pagename.
Otherwise, it returns a blank
Usage
{{ExistNotRedirect | pagename}}
Parameters:
- One page name
- Examples
- A page which exists:
{{ExistNotRedirect|Japan}}→
Template loop detected: Template:Documentation
- A page which does not exist:
{{ExistNotRedirect|The exciting story of paint drying in a small town in Japan one day in April 1927}}→
Template loop detected: Template:Documentation
- Another page which exists:
{{ExistNotRedirect|Portal:History}}→
Template loop detected: Template:Documentation
- A page which does not exist:
{{ExistNotRedirect|Portal:Computing in 1066}}→
Template loop detected: Template:Documentation
- A page which exists, but is a redirect:
{{ExistNotRedirect|Portal:Idaho}}→
Template loop detected: Template:Documentation
| The above documentation is transcluded from Template:ExistNotRedirect/doc. (edit | history) Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. Please add categories to the /doc subpage. Subpages of this template. |