Svoboda | Graniru | BBC Russia | Golosameriki | Facebook

Template:Other versions

Template documentationview · edit · history · purge ]
This documentation is transcluded from Template:Other versions/doc.
[edit subpage]

This template in most cases is transcluded with one file, but it is able to display an unlimited number of files.

This template finally uses Template:F, which can be customized with many parameters.

Two kinds of parameters can be used for that customizing:

  1. global parameters, which are valid for each file, as long they are not suppressed or overriden by
  2. individual parameters, which are valid for only one of the files, whose number is specified.

A parameter is either specified (with a value), or not (when not coded, or without a value).

Specified global parameter values can be individually:

  • kept valid, by not specifying an individual parameter;
  • suppressed, with an individual value specified empty;
  • overriden, by an individual value specified.

An empty specified individual parameter for a not specified global parameter is useless but will not disturb.

An individual parameter with a number exceeding that of the specified files is useless but will not disturb.

Some parameters format the file display layout; when no display occurs, their specification is useless but will not disturb.

Display other files

Usage

The template takes no parameters.

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

See also

There are currently five templates creating file lists with the function:filelist of the Module:Iteration

  1. Other versions a vertical list (without initial)
  2. Derivative versions a vertical list
  3. Derived from a vertical list
  4. Filelist a horizontal list (without initial)
  5. File a horizontal list

All these templates are autoreferencing, and they support also the "gallery" option.

Examples

{{ Other versionsa.pngb.png }} will give 0 A.png and B.png

{{ Other versionsa.pnge.png }} will give 0 A.png

{{ Other versionsa.pnge.png× }} will give 0 A.png

Abbreviation

In simple cases the |by= can be abbreviated with /:
{{ Other versionsExample.jpg/Exampleexample.svg/Extra }}
renders as

{{ Other versionsSolid cyan.svgSolid lime.svgSolid orange.svggallery = yesw = 60 }} will give 0

Pseudo filenames

Normally the parameters 1 ... n specify file names. Some special functions are performed with parameters not specifying real file names;
but all parameters are counted, regardless whether they are real filenames or not. With e.g. the pseudo-filename "×" at the last position the and can be converted to a ,.

Display text

When a parameter is specified starting and ending with " (" sign ") the text between the two quotes is displayed.

Variations

The function supports for series of files with names differing only in one part, as it should be in well designed file systems; see the three examples below.

The variation option is triggered with the parameter "vary" or "v" specifying the pattern that should be replaced.

  • The first file name parameter is not a real file name, it contains the pattern which will be replaced by the following strings.
  • All the other file name parameters are not real file names but the strings replacing the pattern; an empty parameter just removes the pattern.

Specially for variations (but not only) the shortcut parameter "z" is useful: it specifies the display size (like "d"), and sets in addition the "o=Z" and "p= ", when they are not specified otherwise: a |p= specification overwrites the |z= option:

  • behavior by default:
  • with p=­:
    ­­­­­­­
  • with p= :

Variations: single replacements

Each parameter (except the first one) is combined with the first parameter to generate an existing filename.

Example
  • {{ Other versionsvary = ?z = 48Pictogram reply?.svg"Replies: "bluegreensoft green }} gives:
  • Replies:

Variations: loop replacements

For series of files where the variated part is a number, it is possible to specify in one parameter the starting and the ending number, to generate all the file names - without any limit.

Loop replacements are specified with a parameter starting with a "#", followed by the first number, another "#" followed by the second number and ending with another "#".

The second number (the upper limit) must not be less than the first number (the lower limit). When any error occurs, no looping is done.

Example
  • {{ Other versionsv = xxz = 20State Highway xx NZ.svg"  1st: "#1#8#"  2nd: "#20#41#"  3rd: "#56#60# }} gives:
  •   1st:

  •   2nd:

  •   3rd:

In such a way, hundreds of files can be displayed with few parameters, e.g.

  • {{ Flv = #z = 12Bundesstraße # number.svg#1#113# }} gives:

113 Bundesstraßen:

Display other versions of this file

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
File name1

File name of the image (with or without namespace).

Fileoptional
22

no description

Unknownoptional
33

no description

Unknownoptional
make gallery layoutGallery

set to "yes" for a gallery layout: see {{G}} for gallery parameters The characters for the individual parameter codes won't conflict with them for galleries.

Suggested values
yes
Stringoptional
pp

no description

Unknownoptional
dirdir

no description

Unknownoptional