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.

Template:G/doc: Difference between revisions

Template page
m format
m +explanation
Line 14: Line 14:


|3      =m
|3      =m
|3d      =gallery mode, can be specified with <br><code>n</code> or <tt>nolines</tt>, <br><code>p</code> or <tt>packed</tt>,<br><code>h</code> or <tt>packed-hover</tt>, <br><code>o</code> or <tt>packed-overlay</tt>, <br><code>s</code> or <tt>slideshow</tt>, <br><code>t</code> or <tt>traditional</tt><br>when parameter <code>format</code> is not specified, <code>nolines</code> ist defaulted
|3d      =gallery mode, can be specified with <br><code>t</code> or <tt>traditional</tt><br><code>n</code> or <tt>nolines</tt>, <br><code>p</code> or <tt>packed</tt>,<br><code>h</code> or <tt>packed-hover</tt>, <br><code>o</code> or <tt>packed-overlay</tt>, <br><code>s</code> or <tt>slideshow</tt> <br>when parameter <code>format</code> is not specified, <code>nolines</code> is defaulted
|3aliases=mode
|3aliases=mode
|3def    =empty<br>noline
|3def    =<br><br><br>empty<br><br><br><br>nolines
|3stat  =optional-  
|3stat  =optional-  


Line 55: Line 55:


|name={{BASEPAGENAME}}
|name={{BASEPAGENAME}}
|desc-en=Displays a gallery of files, {{Nobold|uses just the gallery tag, with some other defaults and shorter parametrizing; supported names display.}} {{Lua|Module:Pargalpar}}
|desc-en={{Lua|Module:Pargalpar}}Displays a gallery of files, {{Nobold|uses just the gallery tag, with shorter parametrizing and some useful defaults.}}
<div style="float:left;padding-right:2em;width:18%">{{Nobold|__TOC__}}</div><br><br>{{Nobold|Such a gallery can contain one ore more (up to an}} unlimited number{{Nobold|) files.}}<br>{{Nobold|The display format is supported by several options.}}<br clear=both>
|namespace=File
|namespace=File
|usergroup=all
|usergroup=all
Line 63: Line 64:
|i18n-method=-
|i18n-method=-
|i18n-desc=
|i18n-desc=
|seealso=the (reduced) Gallery Function of {{T|F|-}}
|seealso=The (reduced) Gallery Function of {{T|F|-}}<br>Another solution: {{T|Gallery|-}}
|setscats=
|setscats=
|lines=
|lines=
Line 82: Line 83:
;List 2:  {{tle|T=G|<br>file1.ext<br>file2.ext<br>...<br>file{{sub|n}}.ext<br>|more parameters}}
;List 2:  {{tle|T=G|<br>file1.ext<br>file2.ext<br>...<br>file{{sub|n}}.ext<br>|more parameters}}
Also a mixture of both formats is possible.
Also a mixture of both formats is possible.
<div style="background-color:#cfc;width:60%;">The file names ("items") are specified with unnamed parameters.<br>
With <code>1=</code>, <code>2=</code>, <code>3=</code> up to <code>n=</code> an '''unlimited number''' of items can be specified.<br>
Each unnamed parameter (p{{sub|1}} to p{{sub|∞}}) can contain an '''unlimited number''' of newline-separated items.</div>


For <code>format=2</code> only a variation of the first format ist possible, with ''parameter pairs'' of file + description
For <code>format=2</code> only a variation of the first format ist possible, with ''parameter pairs'' of file + description
Line 87: Line 93:
This format needs always parameter pairs, but the second parameter may be without value (just a pipe or an empty new line).<br>
This format needs always parameter pairs, but the second parameter may be without value (just a pipe or an empty new line).<br>
When the description is empty, the name of the file is displayed instead.  
When the description is empty, the name of the file is displayed instead.  
<div style="background-color:#cfc;width:76%;">For <code>format=2</code> care should be taken when defining the items;
it does not matter whether they are pipe-separated or newline-separated, but ''file names'' are defined with item{{sub|1}}, item{{sub|3}}, item{{sub|5}}, ... while descriptions are defined with the corresponding  item{{sub|2}}, item{{sub|4}}, item{{sub|6}}, ...<br>
Description items can be specified empty, but file name items ought to contain a value.</div>


== Examples ==
== Examples ==
Line 129: Line 138:
|{{G|File:Pink check.svg|pink
|{{G|File:Pink check.svg|pink
Purple check.svg|purple
Purple check.svg|purple
Olive green check.svg|olive
File:Yellow check.svg|yellow
File:Yellow check.svg|yellow
White check.svg|white
Cornflower blue check.svg|blue
Black check.svg||Green check.svg|gren
Black check.svg||White check.svg|white|Green check.svg|green
File:Red check.svg|
File:Red check.svg|
Orange check.svg|{{W|orange}}
Orange check.svg|{{W|orange}}
Light green check.svg|green
Light green check.svg|green
|f=2|w=96}}
|f=2|w=96}}
|Some descriptions are missing <br> <br><pre>{{G|File:Pink check.svg|pink
|Some descriptions are missing <br><br><br><br><pre>
Purple check.svg|purple
Purple check.svg|purple
Olive green check.svg|olive
File:Yellow check.svg|yellow
File:Yellow check.svg|yellow
White check.svg|white
Cornflower blue check.svg|blue
Black check.svg||Green check.svg|green
Black check.svg||White check.svg|white|Green check.svg|green
File:Red check.svg|
File:Red check.svg|
Orange check.svg|{{W|orange}}
Orange check.svg|{{W|orange}}

Revision as of 05:38, 14 October 2019

Displays a gallery of files, uses just the gallery tag, with shorter parametrizing and some useful defaults.


Such a gallery can contain one ore more (up to an unlimited number) files.
The display format is supported by several options.

Usage

{{G |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1(list of) file(s) to be displayed, can be in different notationsemptyoptional
f
format
one of three values to specify the format, 0 or 1 or 21optional
m
mode
gallery mode, can be specified with
t or traditional
n or nolines,
p or packed,
h or packed-hover,
o or packed-overlay,
s or slideshow
when parameter format is not specified, nolines is defaulted



empty



nolines
optional
c
caption
gallery captionemptyoptional
p
perrow
pictures per rowemptyoptional
s
style
possible style attributeemptyoptional
a
attr class
attribute (class)emptyoptional
w
widths
width for the displaysemptyoptional
h
heights
height for the displaysemptyoptional
t
text
e.g. "small" for lower text sizeemptyoptional

Additional information

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

The template is intended to be used by the following user groups: all users

See also

The (reduced) Gallery Function of Template:{{F}}
Another solution: Template:{{Gallery}}

Localization

This template is not intended to be localized.

The parameter "format"

can specify one of three options how naming captions for the single files are displayed:

  1. no naming
  2. naming with the "showfilename" option (f=1 is also the default)
  3. naming with the second value of parameter pairs

File list notations

The list of the files for the gallery can be specified in the format

List 1
{{ Gfile1.extfile2.ext...filen.extmore parameters }}

or as a list separated by mandatory linefeeds

List 2
{{ G
file1.ext
file2.ext
...
filen.ext
more parameters }}

Also a mixture of both formats is possible.

The file names ("items") are specified with unnamed parameters.

With 1=, 2=, 3= up to n= an unlimited number of items can be specified.

Each unnamed parameter (p1 to p) can contain an unlimited number of newline-separated items.


For format=2 only a variation of the first format ist possible, with parameter pairs of file + description

List 3
{{ Gfile1.extdescription1file2.extdescription2...filen.extdescriptionnf = 2more parameters }}

This format needs always parameter pairs, but the second parameter may be without value (just a pipe or an empty new line).
When the description is empty, the name of the file is displayed instead.

For format=2 care should be taken when defining the items;

it does not matter whether they are pipe-separated or newline-separated, but file names are defined with item1, item3, item5, ... while descriptions are defined with the corresponding item2, item4, item6, ...

Description items can be specified empty, but file name items ought to contain a value.

Examples

just one file without parameters

{{G| Example.svg}}
some files, without parameters

{{G|Example ba.svg|Example de.svg|Example bn.svg|Example de.svg|Example en.svg|Example ru.svg|Example lt.svg|Example ro.svg|Example tr.svg}}
{{G|Day-template.svg
Emojione 1F642.svg
Emojione BW 1F642.svg
Laughing-smiley.svg
Noto Emoji Oreo 1f642.svg
Noto Emoji Pie 1f642.svg
Line-style-icons-happy.svg
Nuvola emoticon - happy.svg
|f=0|w=48|m=n}}
{{G|Blue king.svg|Chess kgt45.svg
|Chess krt45.svg|Chess kyt45.svg
|Green king.svg|Red king.svg
|Yellow king.svg|Chess kdt45.svg
|f=0|w=80|p=4}}
Some descriptions are missing



Purple check.svg|purple
Olive green check.svg|olive
File:Yellow check.svg|yellow
Cornflower blue check.svg|blue
Black check.svg||White check.svg|white|Green check.svg|green
File:Red check.svg|
Orange check.svg|{{W|orange}}
Light green check.svg|green
|f=2|w=96}}
{{G|EU-section-with-A.svg|{{W|Austria}}|EU-section-with-BG.svg|{{W|Bulgaria}}|EU-section-with-CY.svg|{{W|Cyprus}}
|EU-section-with-CZ.svg|{{W|Czech}}|EU-section-with-D.svg|{{W|Germany}}|EU-section-with-DK.svg|{{W|Denmark}}
|EU-section-with-B.svg|{{W|Belgium}}|EU-section-with-EST.svg|{{W|Estonia}}|EU-section-with-FIN.svg|{{W|Finland}}
|EU-section-with-GR.svg|{{W|Greece}}|EU-section-with-IRL.svg|{{W|Irland}}|EU-section-with-SLO.svg|{{W|Slovenia}}|f=2|h=80|m=n|t=s}}


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