Ankündigung

Einklappen
Keine Ankündigung bisher.

Galerie: Grossansicht öffnet auch Bilder von anderen Galerien

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Galerie: Grossansicht öffnet auch Bilder von anderen Galerien

    Hallo Tim
    Ich habe CustomCatalog im Einsatz, mit welchem wir verschiedene Projekte erfasst haben. Die Projekte werden in folgender Übersichtsseite ausgelesen:

    https://www.gruenenfelder-lorenz.ch/projekte

    Wenn man auf "Bildergalerie anzeigen" klickt, wir die jeweils hinterlegte Bildergalerie im Overlay geöffnet. Das dumme ist, dass es nicht nur Bilder aus der jeweiligen Galerie anzeigt, sondern es dreht direkt durch zur nächsten Galerie.

    Was kann ich einstellen, um dies zu verhindern?
    Lg Janine

  • #2
    Mhh... ja. Für Contao bzw. die Lightbox ist das quasi eine Galerie, weil alles auf ein Attribut zurückzuführen ist. Da muss im gallery_ Template eine individuelle LB Instanz gesetzt werden. Das ist gar nicht so leicht - da muss man bissel tricksen, weil das gallery_ Template hier nicht wirklich etwas von CC weiss.

    Ich nutze für sowas gern eine Globale, die man sich vor der Ausgabe der Galerie entsprechend beschreibt.

    In CC die Globale mit der Id des Eintrags individualisieren. Und im gallery_ Template als Lightbox-Quelle ausgeben.

    customcatog_

    Code:
    [COLOR=#878787][SIZE=11px]<?=[/SIZE][/COLOR][COLOR=#8735A5][SIZE=11px]$GLOBALS[/SIZE][/COLOR][COLOR=#000000][SIZE=11px][[/SIZE][/COLOR][COLOR=#DD2400][SIZE=11px]'GALLERY_LIGHTBOX'[/SIZE][/COLOR][COLOR=#000000][SIZE=11px]] = 'lb_galerie_'.$entry->id;[/SIZE][/COLOR][COLOR=#878787][SIZE=11px]?[/SIZE][/COLOR][COLOR=#878787][SIZE=11px]>[/SIZE][/COLOR]
    <?php echo $entry->field('galerie')->html(); ?>
    gallery_
    Code:
     [COLOR=#333333][SIZE=11px] [COLOR=#878787]<?php[/COLOR] [COLOR=#0045aa]if[/COLOR] [COLOR=#000000]([/COLOR][COLOR=#8735a5]$col[/COLOR][COLOR=#000000]->href)[/COLOR]: [COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR]
      [COLOR=#0045aa]<a [/COLOR][COLOR=#007ab7]href=[/COLOR][COLOR=#5d8f00]"[/COLOR][COLOR=#878787]<?php[/COLOR][COLOR=#0045aa]echo[/COLOR][COLOR=#8735a5]$col[/COLOR][COLOR=#000000]->href;[/COLOR][COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR][COLOR=#5d8f00]" [/COLOR][COLOR=#007ab7]data-lightbox=[/COLOR][COLOR=#5d8f00]"[/COLOR][COLOR=#878787]<?=[/COLOR][COLOR=#8735a5]$GLOBALS[/COLOR][COLOR=#000000][[/COLOR][COLOR=#dd2400]'GALLERY_LIGHTBOX'[/COLOR][COLOR=#000000]];[/COLOR][COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR][COLOR=#5d8f00]" [/COLOR][COLOR=#007ab7]title=[/COLOR][COLOR=#5d8f00]"[/COLOR][COLOR=#878787]<?php[/COLOR][COLOR=#0045aa]echo[/COLOR][COLOR=#8735a5]$col[/COLOR][COLOR=#000000]->alt;[/COLOR][COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR][COLOR=#5d8f00]"[/COLOR][COLOR=#007ab7]itemprop=[/COLOR][COLOR=#5d8f00]"contentUrl"[/COLOR][COLOR=#0045aa]>[/COLOR]
      [COLOR=#878787]<?php[/COLOR] [COLOR=#0045aa]endif[/COLOR]; [COLOR=#878787]?[/COLOR][COLOR=#878787]>[/COLOR]
     [/SIZE][/COLOR]
    Zuletzt geändert von Tim; 12.10.2020, 07:43.
    http://www.premium-contao-themes.com

    Kommentar


    • #3
      Hallo Tim, wunderbar, das hat geklappt Danke !!

      Kommentar

      Lädt...
      X