Contao-Camp 2024
Ergebnis 1 bis 3 von 3

Thema: Url link for all the ce_container

  1. #1
    Contao-Nutzer
    Registriert seit
    07.11.2012.
    Beiträge
    106

    Standard Url link for all the ce_container

    Hi everyone,

    In my dma_eg, I got an hyperlink field and I would like the whole ce_eg can be clicable.

    Here is my custom template :
    PHP-Code:
    div class="<?php echo $this->class?> block"<?php echo $this->cssID?><?php if ($this->style): ?> style="<?php echo $this->style?>"<?php endif; ?>>
        
    <a href="mylinkfield_url">
        <div class="left">
        <?php echo $this->elements['logo_partenaire']; ?>
        </div>

        <div class='right'>
        <h2><?php echo $this->elements['nom_partenaire']; ?></h2>
        <p><?php echo $this->elements['description_partenaire']; ?></p>
        </div>
    </a>

    </div>
    My problem is I don't find the right syntax after <a href="… for it works.
    Thanks for your help.
    Geändert von Charled (04.08.2016 um 16:52 Uhr)

  2. #2
    Contao-Urgestein Avatar von Andreas
    Registriert seit
    19.06.2009.
    Ort
    Mönchengladbach
    Beiträge
    7.703
    User beschenken
    Wunschliste
    Contao-Projekt unterstützen

    Support Contao

    Standard

    Try this in your template to see the variables
    PHP-Code:
    <?php

    dump
    ($this);

    ?>
    Bitte!
    Vor Anfragen im Forum HTML validieren.
    Codesnippets hier im Froum sauber einrücken. Nur Tabs o. nur Leerzeichen verwenden.

    Vielen Dank an alle Wunschlistenerfüller
    Andreas Burg, Web Solutions

  3. #3
    Contao-Fan Avatar von JanoschSkuplik
    Registriert seit
    13.08.2009.
    Ort
    Raesfeld
    Beiträge
    536
    Partner-ID
    6909
    User beschenken
    Wunschliste

    Standard

    Hi,

    use
    PHP-Code:
    <?php $this->showTemplateVars(); ?>
    in your template to show all variables. The best way for own templates is to use
    PHP-Code:
    $this->data['##FIELDNAME##']['##KEY##'

Aktive Benutzer

Aktive Benutzer

Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)

Lesezeichen

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •