Difference between revisions of "Template:RandomImage"
From EncyclopAtys
CeNobiteElf (talk | contribs) m (Created page with '{{#vardefine:randimage|{{#rand:1|{{{num}}}}}}}[[File:{{#switch:{{#var:randimage}} |1={{{f1}}} |2={{{f2}}} |3={{{f3}}} |4={{{f4}}} |5={{{f5}}} |6={{{f6}}} |7={{{f7}}} |8={{{f8}}} …') |
|||
| (7 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 8: | Line 8: | ||
|7={{{f7}}} | |7={{{f7}}} | ||
|8={{{f8}}} | |8={{{f8}}} | ||
| − | |9={{{f9}}}|thumb|{{#switch:{{#var:randimage}} | + | |9={{{f9}}} |
| + | |#default=NeedImage.jpg}}|{{#if: {{{size|}}} | {{{size}}}{{!}} | }}{{#if: {{{align|}}} | {{{align}}}{{!}} | }}thumb|{{#switch:{{#var:randimage}} | ||
|1={{{c1}}} | |1={{{c1}}} | ||
|2={{{c2}}} | |2={{{c2}}} | ||
| Line 17: | Line 18: | ||
|7={{{c7}}} | |7={{{c7}}} | ||
|8={{{c8}}} | |8={{{c8}}} | ||
| − | |9={{{c9}}}}}]]<!-- | + | |9={{{c9}}} |
| + | |#default=No caption}}]]</includeonly><!-- | ||
| − | --><noinclude> | + | --><noinclude>{{Trad |
| + | |DE=Vorlage:RandomImage | ||
| + | |EN=Template:RandomImage | ||
| + | |H=1}} | ||
==Usage== | ==Usage== | ||
| − | <pre>{{RandomImage|num=|f1=|f2=|c1=|c2=}}</pre> | + | <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.