Setting captions on Galleria photo gallery
Asked Answered
I

3

11

I am using Galleria and I would like to use the classic theme and have captions. Is that possible? If so how do I set it up?

Instinctive answered 13/1, 2011 at 6:7 Comment(0)
H
14

Sure, the classic demo has captions (clicking on the top left i displays the caption), you only have to set the alt and optionally the title element of the img tag and you are done.

If you don't see it ensure you set showInfo option to true and if you want to display it all the time, search in the classic theme's js file this line:

// set this to false if you want to show the caption all the time:
_toggleInfo: true

and set _toggleInfo to false

Hestia answered 13/1, 2011 at 6:21 Comment(2)
it is _toggleInfo not _toggle_infoVerrucose
It was _toggle_info back then... github.com/aino/galleria/blob/… thanks for noticing it for newcomers :-DHestia
R
3

Found at Galleria's quick start page (works with the classic theme):

<div id="galleria">
    <img src="/img/pic1.jpg" data-title="My title" data-description="My description">
    <img src="/img/pic2.jpg" data-title="Another title" data-description="My HTML description">
</div>
Rightward answered 7/11, 2012 at 16:7 Comment(0)
M
0

I got the same problem. Found out with Firebug that the div's are there but that the standard theme's CSS these blocks doesn't display.

So basicly remove line 76 from galleria.classic.css: display: none;

After this it still needs some tweaking to make it look good, but at least you know where the problem comes from.

Marche answered 4/2, 2011 at 8:51 Comment(1)
This is hacky, @maid450's solution requires no extra CSS to work.Brophy

© 2022 - 2024 — McMap. All rights reserved.