Jak zrobic aby klikajac na jeden obrazek leciala nam galeria? Mam tak:
<?php
$images = glob($dirPath."/".$offer['id']."/*.jpg"); foreach($images as $image): ?>
<a href="#" data-lightbox="
<?php echo $image; ?>" data-gallery-id="gallery" data-frame="fullscreen-lb" data-caption="
<?php echo $offer -> $language -> title; ?>">
<div class="col-sm-12 image" style="background-image: url(
<?php echo $images[0
]; ?>);"></div>
<?php endforeach ?>
</a>
ok udalo sie jakos, nie wime cyz dobrze ale dziala
<?php
if (count(glob($dirPath."/".$offer['id']."/*.jpg")) != 0
) {
$images = glob($dirPath."/".$offer['id']."/*.jpg");
<a href=\"#\" data-lightbox=\"".$images[0]."\" data-gallery-id=\"gallery\" data-frame=\"fullscreen-lb\" data-caption=\"".$offer -> $language -> title."\">
<div class=\"col-sm-12 image\" style=\"background-image: url(".$images[0]."\"></div>
</a>";
foreach($images as $key => $image)
{
if ($key > 0)
{
echo "<a href=\"#\" data-lightbox=\"".$image."\" data-gallery-id=\"gallery\" data-frame=\"fullscreen-lb\" data-caption=\"".$offer -> $language -> title."\"></a>"; }
}
}
?>