Difference between revisions of "Template:ExistNotRedirect"
Jump to navigation
Jump to search
imported>BrownHairedGirl m (Protected "Template:ExistNotRedirect": User request within own user space ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))) |
imported>Mdaniels5757 (+safesubst per TPER) |
||
| Line 1: | Line 1: | ||
| − | {{#invoke: ExistNotRedirect | main}}<noinclude> | + | {{{{{|safesubst:}}}#invoke: ExistNotRedirect | main}}<noinclude> |
{{Documentation}} | {{Documentation}} | ||
[[Category:Disambiguation and redirection templates]] | [[Category:Disambiguation and redirection templates]] | ||
</noinclude> | </noinclude> | ||
Latest revision as of 18:36, 14 July 2020
| 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}}→ - A page which does not exist:
{{ExistNotRedirect|The exciting story of paint drying in a small town in Japan one day in April 1927}}→ - Another page which exists:
{{ExistNotRedirect|Portal:History}}→ - A page which does not exist:
{{ExistNotRedirect|Portal:Computing in 1066}}→ - A page which exists, but is a redirect:
{{ExistNotRedirect|Portal:Idaho}}→
| 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. |