Module:Galeria/doc

From Multilingual Bookbinding Dictionary
Jump to navigation Jump to search

This is the documentation page for Module:Galeria

This module gets all parameters from the parent template of G, creates the attributes and values, and passes them to the gallery tag.

The mainly invoker is "g" was not recognized as a supported language code."g" was not recognized as a supported language code. "g" was not recognized as a supported language code..
The template G itself does nothing than to invoke this module, it does not specify any own parameters.

The module analyzes these parameters. In special, the unnamed parameter(s) can contain an unlimited number of items.

First of all, the contents of all unnamed parameters are concatenated to one string:

  1. concatenates all pipe-separated items and separates them by an ACK
  2. changes also the newline separators to ACK separators.

Then when the parameter for 'format' is not specified, but

a second parameter exists (after a pipe), and
the first parameter is preceded by a newline, and
the second parameter does not specify a file name,
then the format parameter is defaulted to the value "2".

Using the ACK instead of the slash "/" tolerates items containing slashes, as URL web addresses.
For the format 2, pairs of items are built, with possible defaulting of the description item.

Finally the total amount of items is passed to the "g/layout" was not recognized as a supported language code."g/layout" was not recognized as a supported language code. "g/layout" was not recognized as a supported language code., together with the other parameters.
Because the gallery tag does not support the suppression of the showfilename option,
two transclusions of the gallery tag are necessary - one with, and the other one without showfilename.


A small function "converse" gets a size parameter (possible format examples: 100, x260, 200x240 or 150px, x280px, 220x250px)
and returns the widths and/or the heights values; the local function "parseval" is used to parse the values.

See also