Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Examples  



2.1  Existing article  





2.2  Redirect  





2.3  Empty article  





2.4  Non-existent article  





2.5  Default output  
















Template:Ifexist not redirect






العربية


فارسی
ГӀалгӀай

ि
Bahasa Indonesia
Кыргызча


Oʻzbekcha / ўзбекча

Русский
Shqip

Тоҷикӣ
Türkçe
Тыва дыл
Tiếng Vit


 

Edit links
 









Template
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected template

From Wikipedia, the free encyclopedia
 


Usage

The {{Ifexist not redirect}} template can be used to identify a page which exists, is not blank, and is not a redirect; whereas {{ifexist}} will only check whether the page exists.

Use the format
{{Ifexist not redirect|page|return if true|return if false}}
. The 2nd and 3rd parameters are used to define the output of the template if the condition is true or false, respectively. If not defined the default output is "yes" if true and empty if false.

Examples

Existing article

{{Ifexist not redirect|List of Doctor Who episodes (1963–1989)|true|false}}

true

{{#ifexist:List of Doctor Who episodes (1963–1989)|true|false}}

true

Redirect

{{Ifexist not redirect|List of Daredevil episodes|yes|no}}

no

{{#ifexist:List of Daredevil episodes|yes|no}}

yes

Empty article

{{Ifexist not redirect|Template:Ifexist not redirect/testpage|yes|no}}

no

{{#ifexist:Template:Ifexist not redirect/testpage|yes|no}}

yes

Non-existent article

{{Ifexist not redirect|Green Arrow episodes|1|0}}

0

{{#ifexist:Green Arrow episodes|1|0}}

0

Default output

{{Ifexist not redirect|List of Doctor Who episodes (1963–1989)}}

yes

{{Ifexist not redirect|List of Daredevil episodes}}

Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Ifexist_not_redirect&oldid=746182567"

Categories: 
Lua-based templates
If-then-else templates
Hidden category: 
Wikipedia template-protected templates
 



This page was last edited on 25 October 2016, at 19:34 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki