Template:Ifexist only Commons
Appearance
Usage
The {{ifexist only Commons}} template can be used to identify a media file which exists on Wikimedia Commons but not on English Wikipedia; whereas {{#ifexist:File:...}}
and {{#ifexist:Media:...}}
check, respectively, whether the file exists on English Wikipedia (the first) and on Commons or English Wikipedia (the second).
{{ifexist only Commons|file name|return if true|return if false}}
Examples
File existing only on Commons
- Local: File:Name.jpg
- Commons: commons:File:Name.jpg
{{Ifexist only Commons|Name.jpg|true|false}}
true
File existing only on English Wikipedia
- Local: File:CemeteryGatesPantera.jpg
- Commons: commons:File:CemeteryGatesPantera.jpg
{{Ifexist only Commons|CemeteryGatesPantera.jpg|yes|no}}
no
File existing both on Commons and on English Wikipedia
- Local: File:No Photo Available.svg
- Commons: commons:File:No Photo Available.svg
{{Ifexist only Commons|No Photo Available.svg|y|n}}
n
Non-existent file
{{Ifexist only Commons|Non-existent filename.format|1|0}}
0