Difference between revisions of "Template:Gallery/doc"

From Species-ID
Jump to: navigation, search
(Referring to http://en.wikipedia.org/wiki/Template:Gallery/doc))
 
(now supports 100 images)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
This gallery template shows up to 30 images. The big advantage over the build-in gallery tag (<nowiki><gallery>...</gallery></nowiki>) is that the available space will be dynamically used, depending on available screen space. Furthermore, the captions may contain template calls (which is not possible with the build-in tag).
+
This gallery template shows up to 100 images. The big advantage over the build-in gallery tag (<nowiki><gallery>...</gallery></nowiki>) is that the available space will be dynamically used, depending on available screen space. Furthermore, the captions may contain template calls (which is not possible with the build-in tag).
  
 
Every image is embedded in its own HTML-table, and are floated left. The number of images per row is based upon the width specified and the width of the screen, which allows greater flexibility than the build-in <nowiki><gallery></nowiki> tag.
 
Every image is embedded in its own HTML-table, and are floated left. The number of images per row is based upon the width specified and the width of the screen, which allows greater flexibility than the build-in <nowiki><gallery></nowiki> tag.
Line 6: Line 6:
  
 
  <nowiki>{{Gallery
 
  <nowiki>{{Gallery
|title=Title of gallery goes here
+
  | title=Title of gallery goes here
  |title=Title of gallery goes here
+
  | footer=*Image credit: Wikipedia commons, the free encyclopedia<br />**and so on...
  |footer=*Image credit: Wikipedia commons, the free encyclopedia<br />**and so on...
+
  | width=150
  |width=150
+
  | lines=2
  |lines=2
+
  | File:Information_icon.svg|this is a caption
  |File:Information_icon.svg|this is a caption
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|[[Help:Contents/Links|Links]] can be put in captions.
  |File:Information_icon.svg|[[Help:Contents/Links|Links]] can be put in captions.
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|Full [[MediaWiki]]<br />[[syntax]] may now be used…
  |File:Information_icon.svg|Full [[MediaWiki]]<br />[[syntax]] may now be used…
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
 
  }}</nowiki>
 
  }}</nowiki>
  
Line 30: Line 29:
  
 
{{Gallery
 
{{Gallery
  |title=Title of gallery goes here
+
  | title=Title of gallery goes here
  |footer=*Image credit: Wikipedia commons, the free encyclopedia<br />**and so on...
+
  | footer=*Image credit: Wikipedia commons, the free encyclopedia<br />**and so on...
  |width=150
+
  | width=150
  |lines=2
+
  | lines=2
  |File:Information_icon.svg|this is a caption
+
  | File:Information_icon.svg|this is a caption
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|[[Help:Contents/Links|Links]] can be put in captions.
+
  | File:Information_icon.svg|[[Help:Contents/Links|Links]] can be put in captions.
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
  |File:Information_icon.svg|Full [[Main Page]]<br />[[Special:Allpages| syntax]] may now be used…
+
  | File:Information_icon.svg|Full [[MediaWiki]]<br />[[syntax]] may now be used…
  |File:Information_icon.svg|
+
  | File:Information_icon.svg|
 
  }}
 
  }}
  

Latest revision as of 00:59, 24 May 2012

This gallery template shows up to 100 images. The big advantage over the build-in gallery tag (<gallery>...</gallery>) is that the available space will be dynamically used, depending on available screen space. Furthermore, the captions may contain template calls (which is not possible with the build-in tag).

Every image is embedded in its own HTML-table, and are floated left. The number of images per row is based upon the width specified and the width of the screen, which allows greater flexibility than the build-in <gallery> tag.

Example

{{Gallery
 | title=Title of gallery goes here
 | footer=*Image credit: Wikipedia commons, the free encyclopedia<br />**and so on...
 | width=150
 | lines=2
 | File:Information_icon.svg|this is a caption
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|[[Help:Contents/Links|Links]] can be put in captions.
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|
 | File:Information_icon.svg|Full [[MediaWiki]]<br />[[syntax]] may now be used…
 | File:Information_icon.svg|
 }}

results in:


See English Wikipedia: Gallery template for detailed information.