Difference between revisions of "Template:RandomImage"
From EncyclopAtys
CeNobiteElf (talk | contribs) m |
|||
(3 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | {{#vardefine:randimage|{{#rand:1|{{{num}}}}}}}[[File:{{#switch:{{#var:randimage}} | + | <includeonly>{{#vardefine:randimage|{{#rand:1|{{{num}}}}}}}[[File:{{#switch:{{#var:randimage}} |
|1={{{f1}}} | |1={{{f1}}} | ||
|2={{{f2}}} | |2={{{f2}}} | ||
Line 9: | Line 9: | ||
|8={{{f8}}} | |8={{{f8}}} | ||
|9={{{f9}}} | |9={{{f9}}} | ||
− | |#default=NeedImage.jpg}}|{{#if: {{{size|}}} | {{{size}}}{{!}} | + | |#default=NeedImage.jpg}}|{{#if: {{{size|}}} | {{{size}}}{{!}} | }}{{#if: {{{align|}}} | {{{align}}}{{!}} | }}thumb|{{#switch:{{#var:randimage}} |
|1={{{c1}}} | |1={{{c1}}} | ||
|2={{{c2}}} | |2={{{c2}}} | ||
Line 19: | Line 19: | ||
|8={{{c8}}} | |8={{{c8}}} | ||
|9={{{c9}}} | |9={{{c9}}} | ||
− | |#default=No caption}}]]<!-- | + | |#default=No caption}}]]</includeonly><!-- |
− | --><noinclude> | + | --><noinclude>{{Trad |
+ | |DE=Vorlage:RandomImage | ||
+ | |EN=Template:RandomImage | ||
+ | |H=1}} | ||
==Usage== | ==Usage== | ||
− | <pre>{{RandomImage|num=|size=|align= | + | <pre>{{RandomImage|num=|size=|align=|f1=|f2=|c1=|c2=}}</pre> |
+ | |||
+ | ==Parameters== | ||
+ | ; num | ||
+ | : The number of images to be used, max 9. | ||
+ | |||
+ | ; size | ||
+ | : Default is the full size of the used images. | ||
+ | |||
+ | ; align | ||
+ | : Alignment of the image, default is left. | ||
+ | |||
+ | ; f<1 - 9> | ||
+ | : Not optional. Full file name of all the images to be used. | ||
+ | |||
+ | ; c<1 - 9> | ||
+ | : Optional. Captions of the Respective images. | ||
+ | |||
+ | [[Category:Utility templates|RandomImage]] | ||
</noinclude> | </noinclude> |
Latest revision as of 20:26, 22 August 2023
Usage
{{RandomImage|num=|size=|align=|f1=|f2=|c1=|c2=}}
Parameters
- num
- The number of images to be used, max 9.
- size
- Default is the full size of the used images.
- align
- Alignment of the image, default is left.
- f<1 - 9>
- Not optional. Full file name of all the images to be used.
- c<1 - 9>
- Optional. Captions of the Respective images.