Template talk:Gallery

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

Examples[edit]

{{gallery
|Image:AMS central station 3.jpg|Caption goes here
|Image:AMS central station 3.jpg|Leave blank for no caption
|Image:AMS central station 3.jpg|
|Image:AMS central station 3.jpg|like so.
}}
Creates
{{gallery|width=100|lines=1
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|These captions are limited to a single line.
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|Long words may make a horizontal scroll bar to appear as well
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|TextTextTextTextTextTextTextText
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|
}}
Creates

Well, I see no scroll bar, but it still works without one. Rocket000 01:21, 22 May 2008 (UTC)[reply]

Hello,

I've merged my version of this template, User:Sven/Template:Gallery, including the full documentation and a syntax improvement: Instead of

{{gallery|width=100|lines=1
|Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|These captions are limited to a single line.
|Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|Long words may make a horizontal scroll bar to appear as well
...
}}

you now write

{{gallery|width=100|lines=1
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|These captions are limited to a single line.
|Image:Triumph Tulip Tulipa 'Prinses Irene' Single 2859px.jpg|Long words may make a horizontal scroll bar to appear as well
...
}}

This syntax is more like the real <gallery, you also write

<gallery>
  Image:bla|blo
  Image:bli|blu
</gallery>

and not

<gallery>
   bla|blo
   bli|blu
</gallery>

--Sven 13:33, 23 May 2008 (UTC)[reply]

Necessary?[edit]

Is this template really necessary? It doesn't add much additional functionality. Templates in the image descriptions do work with <gallery> too. Width and lines is present for <gallery> too. The only difference is, that <gallery> does not accept templates in the caption. But if I look at Special:WhatLinksHere/Template:Gallery I don't see any good examples for captions at all... For example at Gryfice the caption says: "Gryfice gallery". Quite self-explanatory. It's a template on the gallery page Gryfice. The caption doesn't add much. In my opinion, we should avoid redundant solutions and remove this template. --Slomox (talk) 05:37, 11 January 2009 (UTC)[reply]

Template LangSwitch[edit]

I want to use the template LangSwitch for the legends of images in the template Gallery, but it doesn't run. Have you a solution for this ?

--Berdea (talk) 12:38, 14 January 2018 (UTC)[reply]

Broken/missing parameter "showfilename"[edit]

The parameter "showfilename" is not working and gives the error message Unknown parameters "showfilename" if used. I see it was implemented in Module:Gallery by @Great Brightstar: 28 August 2020,[1] but they removed it again 5 April 2023.[2]  🗨 desoda (Talk | Contributions) 17:10, 8 May 2024 (UTC)[reply]

I suggest starting a talk at w:Template_talk:Gallery, then if there users get a good solution we can port here. -- Great Brightstar (talk) 10:37, 12 May 2024 (UTC)[reply]