Template:Infobox Card: Difference between revisions

Jump to navigation Jump to search
Fix bug with automatic discovery of image
(Allow text to be optional)
(Fix bug with automatic discovery of image)
Line 5: Line 5:
   <div style="text-align:center;width:100%">[[File:{{{image|}}}|230px|{{{name|}}}]]</div>
   <div style="text-align:center;width:100%">[[File:{{{image|}}}|230px|{{{name|}}}]]</div>
|
|
   {{#ifexist: File:{{{name|}}}.png|
   {{#ifexist: File:{{{name|}}}.jpg|
     <div style="text-align:center;width:100%">[[File:{{{name|}}}.png|230px|{{{name|}}}]]</div>
     <div style="text-align:center;width:100%">[[File:{{{name|}}}.jpg|230px|{{{name|}}}]]</div>
   |
   |
     <div style="margin: 0 auto;width:230px;height:350px;background-color:rgb(255,255,255)">Missing image. Please set the <nowiki>|image=</nowiki> argument for this template<br><br><br>Alternatively upload the file [[File:{{{name|}}}.jpg]]</div>
     <div style="margin: 0 auto;width:230px;height:350px;background-color:rgb(255,255,255)">Missing image. Please set the <nowiki>|image=</nowiki> argument for this template<br><br><br>Alternatively upload the file [[File:{{{name|}}}.jpg]]</div>

Navigation menu