模板:Random slideshow/doc
来自戏曲百科
文件:Edit-copy green.svg | 此頁面是模板:Random slideshow的Templatedocumentation。 此頁面可能包含了模板的使用說明、分類和其他内容。 |
🪧 | 此模板使用Lua语言: |
模板:Notice This template creates a slideshow gallery with a randomised order – i.e. it changes when the page is purged.
Usage
As many images and captions as desired may be specified, in the following format:
{{Random slideshow | First image | first caption | second image | second caption | third image | third caption }}
Credits (e.g. "Photograph: Example") may be specified, using the following format
{{Random slideshow | First image | first caption | credit1= | second image | second caption | credit2= | third image | third caption | credit3= }}
Parameters
|1=
,|3=
,|5=
, ... (or equivalent positional parameters)- File name. The "File:" prefix is optional.
|2=
,|4=
,|6=
, ... (or equivalent positional parameters)- Caption for the file.
|credit1=
,|credit2=
,|credit3=
, ...- Credits for the file. Optional.
|width=
- Maximum width for all images; default is
100%
(intended for use inside portal components) - Can be specified as a
%
(e.g. 75%), or inem
s (e.g. 30em), or inpx
(e.g. 200px) - If a unit is not specified,
px
is assumed (i.e. 350 is equivalent to 350px) |random=
- Set to
no
orfalse
to turn off the randomisation.
Examples
模板:Purge to see these galleries in a different order
Cats
{{Box-header|title=Selected pictures}} {{Random slideshow | File:Cat playing with a lizard.jpg | Cat playing with a lizard | Felis silvestris catus lying on rice straw.jpg | Cat lying on rice straw | Mumbai 03-2016 63 Dhobi Talao Chowk.jpg | Cats in Mumbai | File:Felis catus-cat on snow.jpg | Cat on snow | Tired 20-year-old cat.jpg | Tired cat }} {{Box-footer}}
Mice
{{Random slideshow | width=275 | File:Agouti Mice.jpg | Two mice | credit1= Photograph: Pogrebnoj-Alexandroff | Brown mouse.jpg | Brown mouse | credit2= Photograph: [[User:Kulmalukko|Tiia Monto]] | File:Farbmaeuse.jpg | Mice with food | credit3= Photograph: [[c:User:Whitesky~commonswiki|Whitesky]] | File:Farbmaus.JPG | Mouse on a wheel | credit2= Photograph: [[de:User:R2Dine|R2Dine]] | White lab mouse in hand B.jpg | A mouse in the hand is worth two in the bush | credit4= Photograph: Pogrebnoj-Alexandroff }}
Creates a slideshow gallery with randomized order. Add as many images as desired.
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
Image 1 | 1 (unnamed positional parameter) | Name of the first image, without prefix
| 文件 | 必需 |
Caption 1 | 2 (unnamed positional parameter) | Caption of the first image
| 字符串 | 必需 |
Credit 1 | credit1 | Credit for the first image
| 未知 | 可选 |
Width | width | Maximum width of all images
| 数字 | 推荐 |
Image 2 | 3 (unnamed positional parameter | Name of the second image, without prefix
| 文件 | 推荐 |
Caption 2 | 4 (unnamed positional parameter) | Caption of the second image
| 字符串 | 推荐 |
Credit 2 | credit2 | Credits for the second image
| 未知 | 可选 |