Skip to content

Commit

Permalink
properly group the galleries
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzmg committed Oct 25, 2021
1 parent 512efbe commit bea6148
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contao/templates/js_glightbox.html5
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ echo Template::generateScriptTag('bundles/contaoglightbox/js/glightbox.min.js',
<script>
(function(){
'use strict';
document.querySelectorAll('a[data-lightbox]').forEach((element) => {
if (!!element.dataset.lightbox) {
element.setAttribute('data-gallery', element.dataset.lightbox);
}
});
GLightbox({
selector: 'a[data-lightbox]'
});
Expand Down

0 comments on commit bea6148

Please sign in to comment.