Contao-Camp 2024
Ergebnis 1 bis 8 von 8

Thema: 3.03 - Teaserbild auch nach Erweiterung des Templates nicht da!

  1. #1
    Contao-Nutzer
    Registriert seit
    02.03.2010.
    Beiträge
    198

    Standard 3.03 - Teaserbild auch nach Erweiterung des Templates nicht da!

    Hallo Zusammen,

    ich habe alle Beiträge dazu angesehen.
    Ich habe die Version 3.03 und leider bekomme ich es nicht hin, das Teaserbild auszugeben.
    Die Erweiterung in der event_teaser hat leider gar nicht gebracht. Vielleicht habe ich das auch nich richtig gemacht.
    Soll der Code nur ergänzt werden? oder ?
    Kann mir da wohl noch einmal jemand auf die Sprüge helfen!
    Gruß
    avogt

  2. #2
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    Hallo avogt,

    so richtig weiss ich jetzt nicht wie helfen?

    Vielleicht hilft dir ein kompletter event_teaser.html5 template?
    Geändert von magicsepp (07.04.2013 um 15:46 Uhr)

  3. #3
    Contao-Nutzer
    Registriert seit
    02.03.2010.
    Beiträge
    198

    Standard

    Hallo magicsepp,

    ganau dmait hast Du mir auf die Sprünge geholfen.
    Vielen Dank für Deine Hilfe
    avogt

  4. #4
    Contao-Fan
    Registriert seit
    07.04.2010.
    Beiträge
    274

    Standard

    Ich schalte mich mal kurz ein: Wir haben festgestellt, dass sich das Bild nicht unter den Teaser setzen lässt:
    https://community.contao.org/de/showthread.php?39983-3-0-x-Teaserbild-in-Nachrichten-und-Events-Ausrichtung-nicht-m%F6glich


    Vielleicht kann ja jemand noch einen Tip geben.

  5. #5
    Contao-Urgestein
    Registriert seit
    30.01.2011.
    Ort
    Stuttgart
    Beiträge
    4.138

    Standard

    hab mal das template erweitert und um die Position float_below erweitert.

    PHP-Code:
    <?php if ($this->header): ?>
    <div class="header<?php echo $this->classHeader?>">
    <span class="date"><?php echo $this->firstDate?></span><?php if ($this->firstDay): ?> <span class="day">(<?php echo $this->firstDay?>)</span><?php endif; ?> 
    </div>

    <?php endif; ?>
    <div class="event layout_teaser<?php echo $this->classList?>">
    <?php if ($this->details): ?>
    <h2><a href="<?php echo $this->href?>" title="<?php echo $this->title?> (<?php if ($this->day): echo $this->day?><?php endif; echo $this->date; if ($this->time): ?><?php echo $this->time; endif; ?>)"<?php echo $this->target?>><?php echo $this->link?></a></h2>
    <?php else: ?>
    <h2><?php echo $this->title?></h2>
    <?php endif; ?>
    <?php 
    if ($this->time || $this->span): ?>
    <p class="time"><?php echo $this->time $this->span?></p>
    <?php endif; ?>
    <div class="teaser">
    <?php if ($this->addImage and $this->floating !='below'): ?>
       <figure class="image_container<?php echo $this->floatClass?>"
            <?php if ($this->margin || $this->float): ?>
                style="<?php echo trim($this->margin $this->float); ?>"
            <?php endif; ?>>
            <?php if ($this->href): ?>
                <a href="<?php echo $this->href?>"<?php echo $this->attributes?> title="<?php echo $this->alt?>">
            <?php endif; ?>
            <img src="<?php echo $this->src?>"<?php echo $this->imgSize?> alt="<?php echo $this->alt?>">
            <?php if ($this->href): ?>
                </a>
            <?php endif; ?>
            <?php if ($this->caption): ?>
            <figcaption class="caption"><?php echo $this->caption?></figcaption>
            <?php endif; ?>
        </figure>
    <?php endif; ?> 

    <?php echo $this->teaser?> 
    </div>
    <?php if ($this->details): ?>
    <p class="more"><a href="<?php echo $this->href?>" title="<?php echo $this->readMore?>"<?php echo $this->target?>><?php echo $this->more?> <span class="invisible"><?php echo $this->link?></span></a></p>
    <?php endif; ?>
        <?php if ($this->addImage and $this->floating =='below'): ?>
            <figure class="image_container<?php echo $this->floatClass?>"
                <?php if ($this->margin || $this->float): ?>
                style="<?php echo trim($this->margin $this->float); ?>"
            <?php endif; ?>>
                <?php if ($this->href): ?>
                <a href="<?php echo $this->href?>"<?php echo $this->attributes?> title="<?php echo $this->alt?>">
                    <?php endif; ?>
                    <img src="<?php echo $this->src?>"<?php echo $this->imgSize?> alt="<?php echo $this->alt?>">
                    <?php if ($this->href): ?>
                </a>
            <?php endif; ?>
                <?php if ($this->caption): ?>
                    <figcaption class="caption"><?php echo $this->caption?></figcaption>
                <?php endif; ?>
            </figure>
        <?php endif; ?>
    </div>
    Geändert von magicsepp (08.04.2013 um 07:47 Uhr)

  6. #6
    Contao-Fan
    Registriert seit
    07.04.2010.
    Beiträge
    274

    Standard Kleine Korrektur:

    es fehlt ein "=" <?php if ($this->addImage and $this->floating =='below'): ?>. So funktiniert das richtig:

    PHP-Code:
    <?php if ($this->addImage and $this->floating !='below'): ?>  
        <figure class="image_container<?php echo $this->floatClass?>"
            <?php if ($this->margin || $this->float): ?>
                style="<?php echo trim($this->margin $this->float); ?>"
            <?php endif; ?>>
            <?php if ($this->href): ?>
                <a href="<?php echo $this->href?>"<?php echo $this->attributes?> title="<?php echo $this->alt?>">
            <?php endif; ?>
            <img src="<?php echo $this->src?>"<?php echo $this->imgSize?> alt="<?php echo $this->alt?>">
            <?php if ($this->href): ?>
                </a>
            <?php endif; ?>
            <?php if ($this->caption): ?>
            <figcaption class="caption"><?php echo $this->caption?></figcaption>
            <?php endif; ?>
        </figure>
    <?php endif; ?> 
      
    <?php echo $this->teaser?>
      
    <?php if ($this->addImage and $this->floating =='below'): ?>  
        <figure class="image_container<?php echo $this->floatClass?>"
            <?php if ($this->margin || $this->float): ?>
                style="<?php echo trim($this->margin $this->float); ?>"
            <?php endif; ?>>
            <?php if ($this->href): ?>
                <a href="<?php echo $this->href?>"<?php echo $this->attributes?> title="<?php echo $this->alt?>">
            <?php endif; ?>
            <img src="<?php echo $this->src?>"<?php echo $this->imgSize?> alt="<?php echo $this->alt?>">
            <?php if ($this->href): ?>
                </a>
            <?php endif; ?>
            <?php if ($this->caption): ?>
            <figcaption class="caption"><?php echo $this->caption?></figcaption>
            <?php endif; ?>
        </figure>
    <?php endif; ?>
    Danke, habe ich gleich in das template event_teaser eingebaut, dann ist man im grünen Bereich.

    Gruß Georgi
    Geändert von Georgi (08.04.2013 um 09:49 Uhr)

  7. #7
    Contao-Fan Avatar von Stranger
    Registriert seit
    20.06.2009.
    Ort
    Blankenburg
    Beiträge
    746
    Partner-ID
    5635
    User beschenken
    Wunschliste

    Standard

    Gibts da mittlerweile ne bessere Lösung für?
    Ich halte das so für unsinnig, da man bei Änderungen alles doppelt und dreifach ändern muss (= redundant).
    Du willst dich bei mir bedanken?
    Ich freue mich über Geschenke von meiner Amazon-Wunschliste.

    Contao-Anwender seit 2008
    Contao-Entwickler seit 2013, mehr als 50 Contao Erweiterungen programmiert

    Mein Unternehmen aus Blankenburg (Harz): Fast & Media

  8. #8
    Community-Moderator
    Wandelndes Contao-Lexikon
    Avatar von Spooky
    Registriert seit
    12.04.2012.
    Ort
    Scotland
    Beiträge
    33.897
    Partner-ID
    10107

    Standard

    Zitat Zitat von Stranger Beitrag anzeigen
    Gibts da mittlerweile ne bessere Lösung für?
    Ich halte das so für unsinnig, da man bei Änderungen alles doppelt und dreifach ändern muss (= redundant).
    Im mod_article_teaser wird es umgekehrt gemacht bspw. Also da wird der teaser Text an sich entweder vor oder nach dem Bild positioniert, je nachdem ob man das Bild vor oder nach dem Teaser positioniert haben will.

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
  •