Template:G/doc: Difference between revisions
More actions
first version |
m first version |
||
| 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}}}} | ||
{{TemplateBox | |||
|1 =1 ... | |||
|1d =(list of) file(s) to be displayed, can be in two possible [[#File list formats|formats]] | |||
|1def = | |||
|1stat =optional-<!-- suggested --> | |||
|2 =n | |||
|2d =one of three values, <code>0</code> or <code>1</code> or <code>2</code> | |||
|2aliases=name | |||
|2def =1 | |||
|2stat =optional- | |||
|4 =m | |||
|4d =gallery mode, can be <code>noline</code> <code>packed</code> <code>packed-hover</code> <code>packed-overlay</code> <code>slideshow</code><br>when parameter <code>name</code> is not specified, <code>noline</code> ist defaulted | |||
|4aliases=mode | |||
|4def =empty<br>noline | |||
|4stat =optional- | |||
|5 =c | |||
|5d =gallery caption | |||
|5aliases=caption | |||
|5stat =optional- | |||
|6 =p | |||
|6d =pictures <tt>per row</tt> | |||
|6aliases=perrow | |||
|6stat =optional- | |||
|7 =s | |||
|7d =possible style attribute | |||
|7aliases=style | |||
|7stat =optional- | |||
|8 =w | |||
|8d =width for the displays | |||
|8aliases=widths | |||
|8stat =optional- | |||
|9 =h | |||
|9d =height for the displays | |||
|9aliases=heights | |||
|9stat =optional- | |||
|name={{BASEPAGENAME}} | |||
|desc-en=Displays a gallery of files | |||
|namespace=File | |||
|usergroup=all | |||
|usage-notes= | |||
|type= | |||
|example= | |||
|i18n-method=- | |||
|i18n-desc= | |||
|seealso= | |||
|setscats= | |||
|lines= | |||
|shorthand= | |||
|relieson= | |||
}} | |||
== File list formats == | |||
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}} | |||
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}} | |||
For <code>name=0</code> or <code>name=1</code> even a mixture of both formats is possible. | |||
The first fomat allows a maximum of currently 45 files, the second one is unlimited. | |||
For <code>name=2</code> only a variation of the first format ist possible, with pairs of file + decription | |||
;Fomat 3: {{tle|T=G|file1.ext|description1|file2.ext|description2|...|file{{sub|n}}.ext|description{{sub|n}}|p8=n|2|more parameters}} | |||
When the description is empty, the filename is displayed. | |||
== The parameter "name" == | |||
can specify one of three options how naming captions for the single files are displayed: | |||
*0 no naming | |||
*1 naming with the "showfilename" option (<code>n=1</code> is also the default) | |||
*2 naming with the second value of parameter pairs | |||
== Examples == | |||
<includeonly> | |||
[[Category:Marker templates|{{PAGENAME}}]] | |||
[[Category:File namespace templates|{{PAGENAME}}]] | |||
[[Category:Another file templates| ]] | |||
</includeonly> | |||
Revision as of 17:40, 12 October 2019
Displays a gallery of files
Usage
{{G}}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 ... | (list of) file(s) to be displayed, can be in two possible formats | empty | optional | |
nname | one of three values, 0 or 1 or 2 | 1 | optional | |
mmode | gallery mode, can be noline packed packed-hover packed-overlay slideshowwhen parameter name is not specified, noline ist defaulted | empty noline | optional | |
ccaption | gallery caption | empty | optional | |
pperrow | pictures per row | empty | optional | |
sstyle | possible style attribute | empty | optional | |
wwidths | width for the displays | empty | optional | |
hheights | height for the displays | empty | optional | |
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
Localization
This template is not intended to be localized.
File list formats
The list of the files for the gallery can be specified in the format
- Fomat 1
- {{ G | file1.ext | file2.ext | ... | filen.ext | more parameters }}
or as a list separated by mandatory linefeeds
- Fomat 2
- {{ G |
file1.ext
file2.ext
...
filen.ext
| more parameters }}
For name=0 or name=1 even a mixture of both formats is possible.
The first fomat allows a maximum of currently 45 files, the second one is unlimited.
For name=2 only a variation of the first format ist possible, with pairs of file + decription
- Fomat 3
- {{ G | file1.ext | description1 | file2.ext | description2 | ... | filen.ext | descriptionn | n = 2 | more parameters }}
When the description is empty, the filename is displayed.
The parameter "name"
can specify one of three options how naming captions for the single files are displayed:
- 0 no naming
- 1 naming with the "showfilename" option (
n=1is also the default) - 2 naming with the second value of parameter pairs