Шаблон:Ifimage

Материал из Guild Wars 2 wiki
Версия от 10:02, 30 июля 2014; Blood (обсуждение | вклад) (Новая страница: «<includeonly>{{#if: {{filepath:{{#replace:{{{1|}}}|File:|}}}} | {{{2|}}} | {{{3|}}} }}</includeonly><noinclude> == Description == <pre> {{ifimage|(filename)|(then…»)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Description

{{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

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

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

Skill.png

See also