Шаблон:Ifimage

Материал из Guild Wars 2 wiki
Перейти к: навигация, поиск

Description[править]

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:}}.

Usage[править]

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

Parameters[править]

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

Example[править]

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

Skill.png

See also[править]