Difference between revisions of "Template:Image"
From PCGamingWiki, the wiki about fixing PC games
(added checks for empty parameters and missing file) |
m (includeonly) |
||
Line 1: | Line 1: | ||
− | <div class="article-image"> | + | <includeonly><div class="article-image"> |
<div class="article-image-pic">[[File:{{{image|{{{1}}}}}}|300px|alt={{{2}}}]]</div> | <div class="article-image-pic">[[File:{{{image|{{{1}}}}}}|300px|alt={{{2}}}]]</div> | ||
<div class="article-image-text">{{#if:{{{2|}}}|{{{2}}}|[[Category:Invalid template usage ({{#var:section}})]]}}</div> | <div class="article-image-text">{{#if:{{{2|}}}|{{{2}}}|[[Category:Invalid template usage ({{#var:section}})]]}}</div> | ||
− | </div>{{#ifexist:File:{{{1|}}}|{{#vardefine:screenshots|true}}|[[Category:Invalid template usage ({{#var:section}})]]}}<noinclude>{{Documentation}}</noinclude> | + | </div>{{#ifexist:File:{{{1|}}}|{{#vardefine:screenshots|true}}|[[Category:Invalid template usage ({{#var:section}})]]}}</includeonly><noinclude>{{Documentation}}</noinclude> |
Revision as of 07:57, 11 May 2019
Documentation for the above template (sometimes hidden from view).
Description
Used to embed individual images on pages. Will automatically float to the right side if displayed on non-mobile devices.
Syntax
{{Image|File.png|Caption}}
to embed the image with an appropriate caption.- Do not include the
File:
prefix in the image name as it is already included with the template.
- A caption is required!
Visit Template:Image/Documentation to edit this text. (How does this work?)