Template:G/doc: Difference between revisions
More actions
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}} --> | |||
{{TemplateBox | {{TemplateBox | ||
|1 =1 ... | |1 =1 ... | ||
| Line 13: | Line 14: | ||
|3 =m | |3 =m | ||
|3d =gallery mode, can be <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> ist defaulted | |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 | ||
|3aliases=mode | |3aliases=mode | ||
|3def =empty<br>noline | |3def =empty<br>noline | ||
| Line 47: | Line 48: | ||
|9aliases=heights | |9aliases=heights | ||
|9stat =optional- | |9stat =optional- | ||
|10 =t | |||
|10d =e.g. "small" for lower text size | |||
|10aliases=text | |||
|10stat =optional- | |||
|name={{BASEPAGENAME}} | |name={{BASEPAGENAME}} | ||
|desc-en=Displays a gallery of files | |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 57: | Line 63: | ||
|i18n-method=- | |i18n-method=- | ||
|i18n-desc= | |i18n-desc= | ||
|seealso= | |seealso=the (reduced) Gallery Function of {{T|F|-}} | ||
|setscats= | |setscats= | ||
|lines= | |lines= | ||
| Line 100: | 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= | |f=0|w=48|m=n|p=}} || <pre>{{G| | ||
Day-template.svg | Day-template.svg | ||
Emojione 1F642.svg | Emojione 1F642.svg | ||
| Line 109: | Line 115: | ||
Line-style-icons-happy.svg | Line-style-icons-happy.svg | ||
Nuvola emoticon - happy.svg | Nuvola emoticon - happy.svg | ||
|f=0|w=48|m= | |f=0|w=48|m=n|p=}}</pre> | ||
|- | |- | ||
| {{G|Blue king.svg|Chess kgt45.svg | | {{G|Blue king.svg|Chess kgt45.svg | ||
| Line 115: | Line 121: | ||
|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= | |f=0|w=80|p=4|m=n}} || <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= | |f=0|w=80|p=4|m=n}}</pre> | ||
|- | |- | ||
|{{G|File:Pink check.svg|pink | |{{G|File:Pink check.svg|pink | ||
| Line 128: | Line 134: | ||
Black check.svg||Green check.svg|gren | Black check.svg||Green check.svg|gren | ||
File:Red check.svg| | File:Red check.svg| | ||
Orange check.svg| | Orange check.svg|{{W|orange}} | ||
Light green check.svg|green | Light green check.svg|green | ||
|f=2|w=96|p=}} | |f=2|w=96|p=}} | ||
| | |<pre>{{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|gren | |||
File:Red check.svg| | |||
Orange check.svg|{{W|orange}} | |||
Light green check.svg|green | |||
|f=2|w=96|p=}}</pre> | |||
|- | |- | ||
| | | | ||
Revision as of 16:13, 13 October 2019
Usage
{{G}}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 ... | (list of) file(s) to be displayed, can be in two possible formats | empty | optional | |
fformat | one of three values to specify the format, 0 or 1 or 2 | 1 | optional | |
mmode | 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 traditionalwhen parameter format is not specified, nolines ist defaulted | empty noline | optional | |
ccaption | gallery caption | empty | optional | |
pperrow | pictures per row | empty | optional | |
sstyle | possible style attribute | empty | optional | |
aattr class | attribute (class) | empty | optional | |
wwidths | width for the displays | empty | optional | |
hheights | height for the displays | empty | optional | |
ttext | e.g. "small" for lower text size | 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
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:
- no naming
- naming with the "showfilename" option (
f=1is also the default) - naming with the second value of parameter pairs
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 }}
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 + decription
- Fomat 3
- {{ G | file1.ext | description1 | file2.ext | description2 | ... | filen.ext | descriptionn | 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).
When the description is empty, the name of the file is displayed instead.
Examples
| {{G|Example.svg}} | |
| {{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|p=}}
| |
{{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|m=n}}
| |
|
{{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|gren
File:Red check.svg|
Orange check.svg|{{W|orange}}
Light green check.svg|green
|f=2|w=96|p=}}
|