Verwendung: getImageObject mit Link zum ganzen Bild

Katja's Avatar

Katja

20 Jul, 2021 10:21 AM

Produkt: Custom Elements Contao
Contao-Version: 4.9

Hey Ihr,
ich stehe gerade auf dem Schlauch und weiß nicht wie ich mit getImageObject ein Link zu dem Bild erstellen kann. Wie bei dem standard Contao Bildern -> Lightbox.


Bis jetzt habe ich im Template:

<?php foreach ($this->images as $uuid): ?>
    <?php if ($image1 = $this->getImageObject($uuid->image1, array('', '', 4))): ?>

        <figure class="image_container">
            <?php $this->insert('picture_default', $image1->picture) ?>
        </figure>               

    <?php endif ?>

<?php endforeach ?>

Danke Marco

  1. Support Staff 1 Posted by RockSolid Theme... on 21 Jul, 2021 09:24 AM

    RockSolid Themes's Avatar

    Vielen Dank für Ihre Frage.

    Informationen dazu finden Sie in folgendem Beitrag: https://help.rocksolidthemes.com/discussions/contao/33920#comment_49054025

  2. 2 Posted by Marco on 21 Jul, 2021 09:57 AM

    Marco's Avatar

    Danke, funktioniert super. :)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac