Template:Ifexist only Commons/doc

From WikiProjectMed
Jump to navigation Jump to search

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:...}} will only check, respectively, whether the file exists on English Wikipedia (the first) and on Commons or English Wikipedia (the second).

Use the format

{{ifexist only Commons|file name|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.

Examples

File existing only on Commons

{{Ifexist only Commons|Name.jpg|true|false}}

true

File existing only on English Wikipedia

{{Ifexist only Commons|CemeteryGatesPantera.jpg|yes|no}}

no

File existing both on Commons and on English Wikipedia

{{Ifexist only Commons|No Photo Available.svg|y|n}}

n

Non-existent file

{{Ifexist only Commons|Non-existent filename.format|1|0}}

0