Difference between revisions of "Template:InfoboxScreenshot"

From Istaria Lexica

Line 1: Line 1:
<includeonly>{{#if:{{{image|}}}|{{InfoboxScreenshot/Loader|{{{image|}}}|{{{width|296px}}}|{{{setprop|}}}}}|{{InfoboxScreenshot/Loader|{{ReplaceFileSpecialChars|{{PAGENAME}}.jpg}}|{{{width|296px}}}|{{{setprop|}}}}}}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox Templates]][[Category:Non-standalone Templates]]</noinclude><nowiki/>
+
<includeonly>{{#if:{{{image|}}}|{{InfoboxScreenshot/Loader|{{{image|}}}|{{{width|296px}}}|{{{setprop|}}}}}|{{InfoboxScreenshot/Loader|{{ReplaceFileSpecialChars|{{PAGENAME}}.jpg}}|{{{width|296px}}}|{{{setprop|}}}}}}}</includeonly><noinclude>{{Documentation}}[[Category:Infobox Templates]][[Category:Non-standalone Templates]][[Category:Add Data Templates]]</noinclude><nowiki/>

Revision as of 18:46, 21 October 2022

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

Description[edit]

Adds a screenshot option to a template. Checks for an existing screenshot of the page, named {{PAGENAME}}.jpg. If there is one it will render it, else it prints out a fancy upload option.

Other features:

  • Find pages using this template
  • The image width defaults to 296px.
  • providing an 'image' parameter lets the template skip the search for {{PAGENAME}}.jpg and use the provided file name instead. Good for special filenames and backwards compatibility.

Syntax[edit]

The image parameter lets you provide an alternative image filename. Leave blank if you don't need.

{{InfoboxScreenshot
|image   = provide an image filename
|width   = provide an alternative width. Defaults to 296px
|setprop = if set to 'true' and if the image exists, set a filename property (Primaryimage) for further use
}}

Examples[edit]

{{InfoboxScreenshot
|image   = Bessy.jpg
|width   = 180px
|setprop = true
}}

{{InfoboxScreenshot
|image   = Bessy.jpg
}}


Visit Template:InfoboxScreenshot/doc to edit this text. (How to: document correctly)