Template:Ifimage

From Guild Wars Wiki
Jump to: navigation, search

Description[edit]

{{ifimage|(filename)|(then)|(else)}}

This template is similar to {{#ifexist:}} + {{Ifexists}} as it checks the existence of the given file - this template however only works for files - not pages. The difference is that the checked file is not added to Wanted pages, and no hefty DPL is needed either. Instead, it uses the MediaWiki built-in function {{filepath:}}.

Parameters[edit]

unnamed parameter 1
File name without braces, including namespace.
unnamed parameter 2
Optional. Wikitext if page exists.
unnamed parameter 3
Optional. Wikitext if page does not exists.

Example[edit]

[[File:{{ifimage|Frenzy (black and white).jpg|Frenzy (black and white).jpg|Frenzy.jpg}}|20px]]

Frenzy.jpg

See also[edit]