2017 © Pedro Peláez
 

contao-bundle contao-lightbox-gallery-bundle

This bundle offers a contao extension for lightbox-gallery based on mcstudios/glightbox

image

heimrichhannot/contao-lightbox-gallery-bundle

This bundle offers a contao extension for lightbox-gallery based on mcstudios/glightbox

  • Tuesday, July 3, 2018
  • by digitales@heimrich-hannot.de
  • Repository
  • 6 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Contao Lightbox Gallery Bundle

, (*1)

This bundle offers a contao extension for lightbox-gallery based on mcstudios/glightbox., (*2)

Install

Install with composer or contao manger:, (*3)

composer require heimrichhannot/contao-lightbox-gallery-bundle

Usage

This bundle works out-of-the-box with contao galleries., (*4)

Encore bundle

If you're using this bundle with encore bundle, assets are blocked by default. For content elements where fullsize option is checked, the assets are added automatically., (*5)

Extended usage

To add images to an gallery define an unique data lightbox id for the elements. Each a tag must have the same data lightbox id to be in the same gallery., (*6)

To add an title to the gallery simply add a title attribute to the a tag. If you want to add a caption add an figcaption element after the a tag., (*7)

<div class="gallery">
    <a href="img/2-1.jpg" data-caption="Image caption" data-lightbox="193910782" title="Title">
        <img src="img/thumbnails/2-1.jpg" alt="First image">
    </a>
    <figcaption class="caption">Caption</figcaption>
    <a href="img/2-2.jpg" data-lightbox="193910782">
        <img src="img/thumbnails/2-2.jpg" alt="Second image">
    </a>
    ...
</div>

The Versions