Note: This is a project under development. The articles on this wiki are just being initiated and broadly incomplete. You can Help creating new pages.

Template:Random slideshow

From Ayurwiki
Revision as of 10:37, 10 September 2023 by Prabhakar (talk | contribs) (Created page with "{{Documentation subpage}} {{Mobile view problem|explanation=On mobile devices a standard gallery is displayed instead of the slideshow. If the screen width is less than 720px,...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Template:Mobile view problem

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 and will not display in article space.

Usage

As many images and captions as desired may be specified, in the following format: <syntaxhighlight lang="wikitext"> Script error: No such module "Random slideshow". </syntaxhighlight> Credits (e.g. "Photograph: Example") may be specified, using the following format <syntaxhighlight lang="wikitext"> Script error: No such module "Random slideshow". </syntaxhighlight>

Parameters

|1=, |3=, |5=, ... Template:Resize
File name. The "File:" prefix is optional.
|2=, |4=, |6=, ... Template:Resize
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)
|random=
Set to no or false to turn off the randomisation.

Examples

Template:Purge to see these galleries in a different order

Cats

<syntaxhighlight lang="wikitext"> Script error: No such module "Random slideshow". Script error: No such module "Random slideshow". Template:Box-footer </syntaxhighlight>

Script error: No such module "Random slideshow". Script error: No such module "Random slideshow". Template:Box-footer

Mice

<syntaxhighlight lang="wikitext"> Script error: No such module "Random slideshow". </syntaxhighlight> Script error: No such module "Random slideshow".

TemplateData

Template:TemplateData header

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

Template parameters

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
Image 11(unnamed positional parameter)

Name of the first image, without prefix

Default
(empty)
Example
Portal puzzle.svg, 1=Portal puzzle.svg
Auto value
empty
Filerequired
Caption 12(unnamed positional parameter)

Caption of the first image

Default
(empty)
Example
2=This is the default portal icon
Auto value
empty
Stringrequired
Credit 1credit1

Credit for the first image

Default
empty
Example
Photograph: [[User:Example|Example]]
Auto value
empty
Unknownoptional
Widthwidth

Maximum width of all images

Default
(none)
Example
width=80px, width=30em, width=50%
Auto value
empty
Numbersuggested
Image 23(unnamed positional parameter

Name of the second image, without prefix

Default
(empty)
Example
Brown mouse.jpg, 3=Brown mouse.jpg
Auto value
empty
Filesuggested
Caption 24(unnamed positional parameter)

Caption of the second image

Default
(empty)
Example
4=This is a brown mouse
Auto value
empty
Stringsuggested
Credit 2credit2

Credits for the second image

Default
empty
Example
Photographer: [[User:Example|Example]]
Auto value
empty
Unknownoptional

Template:Portal templates navbox