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 format
Line 1: Line 1:
{{Underconstruction|date=2019-5-5|user=Sarang|notready=on|invite=Please wait a bit!{{0}}}}
<!-- {{Underconstruction|date=2019-5-5|user=Sarang|notready=on|invite=Please wait a bit!{{0}}}}
<!-- {{redirects|gallery}} -->
    {{redirects|gallery}} -->
{{TemplateBox
{{TemplateBox
|1      =1 ...
|1      =1
|1d      =(list of) file(s) to be displayed, can be in two possible [[#File list formats|formats]]
|1d      =(list of) file(s) to be displayed, can be in different [[#File list notations|notations]]
|1def    =
|1def    =
|1stat  =optional-<!-- suggested -->  
|1stat  =optional<!-- suggested -->  


|2      =f
|2      =f
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=Displays a gallery of files, {{Nobold|uses just the gallery tag, with some other defaults and shorter parametrizing; supported names display.}} {{Lua|Module:Pargalpar}}
|namespace=File
|namespace=File
|usergroup=all
|usergroup=all
Line 76: Line 76:
# naming with the second value of parameter pairs
# naming with the second value of parameter pairs


== File list formats ==
== File list notations ==
The list of the files for the gallery can be specified in the format  
The list of the files for the gallery can be specified in the format  
;Fomat 1: {{tle|T=G|file1.ext|file2.ext|...|file{{sub|n}}.ext|more parameters}}
;List 1: {{tle|T=G|file1.ext|file2.ext|...|file{{sub|n}}.ext|more parameters}}
or as a list separated by <u>mandatory linefeeds</u>
or as a list separated by <u>mandatory linefeeds</u>
;Fomat 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.


For <code>format=2</code> only a variation of the first format ist possible, with ''parameter pairs'' of file + decription
For <code>format=2</code> only a variation of the first format ist possible, with ''parameter pairs'' of file + description
;Fomat 3:  {{tle|T=G|file1.ext|description1|file2.ext|description2|...|file{{sub|n}}.ext|description{{sub|n}}|p8=f|2|more parameters}}
;List 3:  {{tle|T=G|file1.ext|description1|file2.ext|description2|...|file{{sub|n}}.ext|description{{sub|n}}|p8=f|2|more parameters}}
This format needs always parameter pairs, but the second parameter may be without value (just a pipe or a 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.  


== Examples ==
== Examples ==
{|
{| class="wikitable"}}
 
|-
|-
|{{G|Example.png}}  || <nowiki>{{G|Example.svg}}</nowiki>  
|{{G|
Example.png}}  || <small>just one file without parameters</small><br><br><nowiki>{{G|
Example.svg}}</nowiki>  
|-
|-
|{{G|Example ba.svg|Example bn.svg|Example de.svg|Example en.svg|Example ru.svg|Example lt.svg|Example ro.svg|Example tr.svg}}  
|{{G|Example ba.svg|Example bn.svg|Example de.svg|Example en.svg|Example ru.svg|Example lt.svg|Example ro.svg|Example tr.svg}}  
| <nowiki>{{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}}</nowiki>
| <small>some files, without parameters</small><br><br><nowiki>{{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}}</nowiki>
|-
|-
|{{G|
|{{G|Day-template.svg
Day-template.svg
Emojione 1F642.svg
Emojione 1F642.svg
Emojione BW 1F642.svg
Emojione BW 1F642.svg
Line 106: Line 106:
Line-style-icons-happy.svg
Line-style-icons-happy.svg
Nuvola emoticon - happy.svg
Nuvola emoticon - happy.svg
|f=0|w=48|m=n|p=}} || <pre>{{G|
|f=0|w=48|m=n}} || <pre>{{G|Day-template.svg
Day-template.svg
Emojione 1F642.svg
Emojione 1F642.svg
Emojione BW 1F642.svg
Emojione BW 1F642.svg
Line 115: Line 114:
Line-style-icons-happy.svg
Line-style-icons-happy.svg
Nuvola emoticon - happy.svg
Nuvola emoticon - happy.svg
|f=0|w=48|m=n|p=}}</pre>
|f=0|w=48|m=n}}</pre>
|-
|-
| {{G|Blue king.svg|Chess kgt45.svg
| {{G|Blue king.svg|Chess kgt45.svg
Line 121: Line 120:
|Green king.svg|Red king.svg
|Green king.svg|Red king.svg
|Yellow king.svg|Chess kdt45.svg
|Yellow king.svg|Chess kdt45.svg
|f=0|w=80|p=4|m=n}} || <pre>
|f=0|w=80|p=4}} || <pre>
{{G|Blue king.svg|Chess kgt45.svg
{{G|Blue king.svg|Chess kgt45.svg
|Chess krt45.svg|Chess kyt45.svg
|Chess krt45.svg|Chess kyt45.svg
|Green king.svg|Red king.svg
|Green king.svg|Red king.svg
|Yellow king.svg|Chess kdt45.svg
|Yellow king.svg|Chess kdt45.svg
|f=0|w=80|p=4|m=n}}</pre>
|f=0|w=80|p=4}}</pre>
|-
|-
|{{G|File:Pink check.svg|pink
|{{G|File:Pink check.svg|pink
Line 136: Line 135:
Orange check.svg|{{W|orange}}
Orange check.svg|{{W|orange}}
Light green check.svg|green
Light green check.svg|green
|f=2|w=96|p=}}
|f=2|w=96}}
|<pre>{{G|File:Pink check.svg|pink
|Some descriptions are missing <br> <br><pre>{{G|File:Pink check.svg|pink
Purple check.svg|purple
Purple check.svg|purple
File:Yellow check.svg|yellow
File:Yellow check.svg|yellow
White check.svg|white
White check.svg|white
Black check.svg||Green check.svg|gren
Black check.svg||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|p=}}</pre>
|f=2|w=96}}</pre>
|-
|-
|
|{{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}}
|<pre>{{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}}</pre>
|}
|}



Revision as of 17:01, 13 October 2019

Displays a gallery of files, uses just the gallery tag, with some other defaults and shorter parametrizing; supported names display.

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
n or nolines,
p or packed,
h or packed-hover,
o or packed-overlay,
s or slideshow,
t or traditional
when parameter format is not specified, nolines ist defaulted
empty
noline
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}}

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.

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.

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

{{G|File:Pink check.svg|pink
Purple check.svg|purple
File:Yellow check.svg|yellow
White check.svg|white
Black check.svg||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.