Captions in photo gallery

Hi,

I created a photogallery (default layout) but I do not understand how show images captions.
There is a way to show the item name or the content as caption?

Thanks a lot for your help

Hi Rebecca,

The layout for the individual slides is set in the Layouts->Slide Layouts → List

See as this gallery is using fancybox you’ll need to populate the data-caption atribute:

`<a href="image.jpg" data-fancybox data-caption="Caption for single image">
	<img src="thumbnail.jpg" alt="" />
</a>`

If you place the following in your Layouts->Slide Layouts → List you’ll get an image caption in both the on page view and in the modal popup view of the image:

<li>
    <figure>
  <a data-fancybox="gallery{{this['ParentId']}}" href="{{this['ImageSrc']}}" data-caption="{{this['Description']}}">
      <img src="{{this['ImageSrc']}}?width=223&height=223&mode=crop" alt=""
  /></a>
  <figcaption>{{this['Description']}}</figcaption>
  </figure>
</li>

The source of the caption will be the Content/Description (WYSIWYG/Code View) field at the bottom of the screen.

1 Like

@ Alex_B_Centrifuge, thanks a lot for your help!
It works perfectly!

1 Like

Thank you @Alex_B_Centrifuge - I was just searching for a solution here as well and you’re answer here helped out!