Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Galeria/doc

From Neodyland Wiki
Revision as of 18:47, 7 February 2020 by commons>Sarang (format)

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 template:{{G}}.
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 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 Template:{{G/layout}}, 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 formats: 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.

Cookies help us deliver our services. By using our services, you agree to our use of cookies.