Modèle:Ifimage
Révision datée du 5 janvier 2019 à 08:15 par PayJi (discussion | contributions) (Page créée avec « <includeonly>{{#if: {{filepath:{{#titleparts:{{#replace:{{{1|}}}|File:|}}}}}} | {{{2|}}} | {{{3|}}} }}</includeonly><noinclude> == Description == <pre> {{ifimage|(filename... »)
Sommaire
Description
{{ifimage|(filename)|(then)|(else)}}
This template is similar to {{#ifexist:}} + Modèle:Tl 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]]