Difference between revisions of "Template:InfoboxScreenshot/Loader"

From Istaria Lexica

(Created page with "<includeonly><p class="InfoboxScreenshot">{{#if:{{{1|}}}|{{Exists|page=File:{{{1}}}|then=[[File:{{{1}}}|{{{2}}}]]|else=File:TitleTemplate.png|{{{2}}}|link={{fullurl:Special:...")
 
Line 1: Line 1:
<includeonly><p class="InfoboxScreenshot">{{#if:{{{1|}}}|{{Exists|page=File:{{{1}}}|then=[[File:{{{1}}}|{{{2}}}]]|else=[[File:TitleTemplate.png|{{{2}}}|link={{fullurl:Special:Upload|wpDestFile={{ReplaceFileSpecialChars|{{{1}}}}}}}]]}}}}</p>
+
<includeonly><p class="InfoboxScreenshot">{{#if:{{{1|}}}|{{Exists|page=File:{{ReplaceFileSpecialChars|{{{1}}}}}|then=[[File:{{ReplaceFileSpecialChars|{{{1}}}}}|{{{2}}}]]|else=[[File:TitleTemplate.png|{{{2}}}|link={{fullurl:Special:Upload|wpDestFile={{ReplaceFileSpecialChars|{{{1}}}}}}}]]}}}}</p></includeonly><noinclude>[[Category:Infobox Templates]]{{Documentation}}</noinclude>
</includeonly><noinclude>[[Category:Infobox Templates]]{{Documentation}}</noinclude>
 

Revision as of 22:47, 29 August 2022

Template documentation (for the template shown above, sometimes hidden or invisible)

Description[edit]

Shows a provided image. If the image does not exist, a fancy 'add image' picture is shown instead. If the image filename is not provided, do nothing.

Other features:

Syntax[edit]

{{InfoboxScreenshot/Loader|image name|width|setprop}}

Parameters[edit]

The parameters are unnamed.

{{InfoboxScreenshot/Loader
| = the filename of the image
| = the final width of the box
| = if set to 'true' and if the image exists, set a filename property (Primaryimage) for further use
}}

Examples[edit]

{{InfoboxScreenshot/Loader|picture.jpg|200px}}
{{InfoboxScreenshot/Loader|anotherpicture.jpg}}
{{InfoboxScreenshot/Loader|yetanotherpicture.jpg|true}}