Difference between revisions of "Template:ExistNotRedirect/doc"
Jump to navigation
Jump to search
imported>BrownHairedGirl (done) |
imported>BrownHairedGirl m (→Usage: typo) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 17: | Line 17: | ||
# Another page which exists:<br /><code><nowiki>{{ExistNotRedirect|Portal:History}}</nowiki></code> → {{ExistNotRedirect|Portal:History}} | # Another page which exists:<br /><code><nowiki>{{ExistNotRedirect|Portal:History}}</nowiki></code> → {{ExistNotRedirect|Portal:History}} | ||
# A page which does not exist:<br /><code><nowiki>{{ExistNotRedirect|Portal:Computing in 1066}}</nowiki></code> → {{ExistNotRedirect|Portal:Computing in 1066}} | # A page which does not exist:<br /><code><nowiki>{{ExistNotRedirect|Portal:Computing in 1066}}</nowiki></code> → {{ExistNotRedirect|Portal:Computing in 1066}} | ||
| − | # A page which exists, but is a | + | # A page which exists, but is a redirect:<br /><code><nowiki>{{ExistNotRedirect|Portal:Idaho}}</nowiki></code> → {{ExistNotRedirect|Portal:Idaho}} |
<includeonly>{{sandbox other|| | <includeonly>{{sandbox other|| | ||
<!-- Categories below this line, please; interwikis at Wikidata --> | <!-- Categories below this line, please; interwikis at Wikidata --> | ||
| − | + | [[Category:Disambiguation and redirection templates]] | |
}}</includeonly> | }}</includeonly> | ||
Latest revision as of 21:22, 9 August 2020
| This is a documentation subpage for Template:ExistNotRedirect. It contains usage information, categories and other content that is not part of the original template page. |
| 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}}→