跳至內容

模板:Random slideshow

本頁使用了標題或全文手工轉換
維基教科書,自由的教學讀本
文檔圖示 模板文檔[檢視] [編輯] [歷史] [清除快取]


This template creates a slideshow gallery with a randomised order – i.e. it changes when the page is purged. It is intended for use in portals.

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 in ems (e.g. 30em), or in px (e.g. 200px)
If a unit is not specified, px is assumed (i.e. 350 is equivalent to 350px)

Examples

[編輯]

清除快取 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}}

Selected pictures

頁面Template:Random slideshow/styles.css沒有內容。package.lua第80行Lua錯誤:module 'Module:Excerpt/portals' not found Template: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
}}

頁面Template:Random slideshow/styles.css沒有內容。package.lua第80行Lua錯誤:module 'Module:Excerpt/portals' not found

See also

[編輯]

Template:Portal templates navbox

Template:Cot

這是用於新版視覺化編輯器及其他工具的模板資料文件。

Random slideshow模板資料

Creates a slideshow gallery with randomized order. Add as many images as desired.

模板參數[編輯模板資料]

此模板以參數區塊格式為優先。

參數描述類型狀態
Image 11 (unnamed postional parameter)

Name of the first image, without prefix

預設
(empty)
範例
Portal puzzle.svg, 1=Portal puzzle.svg
檔案必填
Caption 12 (unnamed positional parameter)

Caption of the first image

預設
(empty)
範例
2=This is the default portal icon
字串必填
Credit 1credit1

Credit for the first image

範例
Photograph: [[User:Example|Example]]
不明非必填
Widthwidth

Maximum width of all images

預設
(none)
範例
width=80px, width=30em, width=50%
數值建議
Image 23 (unnamed positional parameter

Name of the second image, without prefix

預設
(empty)
範例
Brown mouse.jpg, 3=Brown mouse.jpg
檔案建議
Caption 24 (unnamed positional parameter)

Caption of the second image

預設
(empty)
範例
4=This is a brown mouse
字串建議
Credit 2credit2

Credits for the second image

範例
Photographer: [[User:Example|Example]]
不明非必填