I'm having trouble making LightBox open a specific gallery that loads images from a certain directory. At this point the code below, lists several thumbnails, which would be the image albums. When I open an image, it works the feature, but lists the thumbnails, not what is in the directory of that ID
.
Is this possible. Images are separated into different directories according to ID
of the gallery. The path in the database is saved, and the file in a directory. Look at my code:
PHP
foreach($dados_fotos as $gal) {
$fotos_treinamento .= <<<HTML
<div class="medium-3 columns end">
<a rel="lightbox[]" data-group="gallery-{$gal['galeria']}" href="http://sistema/public/uploads/fotos/{$gal['galeria']}/{$gal['foto']}">
<div class="card">
<div class="card-section">
<img data-galery="gallery-{$gal['galeria']}" src="http://sistema/public/uploads/fotos/{$gal['galeria']}/{$gal['foto']}"/></div></div></a></div>HTML;}
EDIT
Querythebank,thegalleryID,theimageID,andthephotopatharestoredinthebank.
ThedirectoryinthefolderwherethephysicalfilesareisthesameastheIDofthegallery.ex:fotos/ID_GALERIA/arquivo.jpg