Ergebnis 1 bis 3 von 3

Thema: news_latest.html $this->author wird nicht ausgegeben

  1. #1
    Community-Moderator & Contao-Urgestein Avatar von derRenner
    Registriert seit
    23.10.2012.
    Ort
    hoRn|waldviertel
    Beiträge
    2.858
    Contao-Projekt unterstützen

    Support Contao

    Standard news_latest.html $this->author wird nicht ausgegeben

    Hallo,

    PHP-Code:
                        <div class="info-block-date float-left">
                            <p class="info">
                                <span><?php echo $this->parseDate("d.m.Y"$this->timestamp); ?></span>
                                <span><?= $this->author ?></span>                    
                                <span> | </span>
                            </p>        
                        </div>
    Ich bekomme den Autor nicht ausgegeben ... finde aber nicht heraus warum.
    die Ausgabe der Variablen bringt ein 'author = NULL'

    Hat jemand den rettenden Tipp für mich?


    Hier das ganz template:
    PHP-Code:
    <div class="container bg-white">
        <div class="layout_latest pb-3 pt-4 border-bottom row arc_<?= $this->archive->id ?> block<?= $this->class ?>" itemscope itemtype="http://schema.org/Article">
            <div class="image-block col-3">
                <?php if ($this->singleSRC): ?>
                <figure class="image_container "<?php if ($this->margin): ?> style="<?=$this->margin ?>""<?php endif; ?>>

                    <?php if ($this->hasText && $this->hasTeaser): ?>
                    <a href="<?= $this->link ?>" title="">
                    <?php endif; ?>
                    
                        <?php $this->insert('picture_default'$this->picture); ?>
                    
                    <?php if ($this->hasText && $this->hasTeaser): ?>
                    </a>
                    <?php endif; ?>

                    <?php if ($this->caption): ?>
                    <figcaption class="caption"><?= $this->caption ?></figcaption>
                <?php endif; ?>
                </figure>
                <?php else: ?>

                <?php if ($this->hasText && $this->hasTeaser): ?>
                <a href="<?= $this->link ?>" title="">
                <?php endif; ?>    
                <figure class="image_container no-image">    </figure>
                <?php if ($this->hasText && $this->hasTeaser): ?>
                </a>
                <?php endif; ?>
                <?php endif; ?>
            </div>
        
            <div class="info-block-wrapper col-9">
                <div class="info-block">
                    <?php if ($this->hasMetaFields): ?>
                        <div class="info-block-date float-left">
                            <p class="info">
                                <span><?php echo $this->parseDate("d.m.Y"$this->timestamp); ?></span>
                                <span><?= $this->author ?></span>                    
                                <span> | </span>
                            </p>        
                        </div>
                        <div class="info-block-category">
                            <?php if ($this->categories): ?>
                                <ul class="info-category categories nav">
                                    <?php foreach ($this->categories as $category): ?>
                                        <li class="nav-item<?= $category['class'?>">
                                            <?php if ($category['image']): ?>
                                                <figure class="image_container">
                                                    <?php $this->insert('picture_default'$category['image']->picture?>
                                                </figure>
                                            <?php endif; ?>

                                            <?php if ($category['href']): ?>
                                                <a href="<?= $category['href'?>" title="<?= $category['linkTitle'?>"><?= $category['name'?></a>
                                            <?php else: ?>
                                                <span>&nbsp;<?= $category['name'?></span>
                                            <?php endif; ?>
                                        </li>
                                    <?php endforeach; ?>
                                </ul>
                            <?php endif; ?>
                        </div>

                    <?php endif; ?>    
                </div>
                
                <?php if ($this->hasText && $this->hasTeaser): ?>
                    <h2 itemprop="name" class="news-latest-title"><?= $this->linkHeadline ?></h2>
                <?php else: ?>
                    <h2 itemprop="name" class="news-latest-title"><?= $this->newsHeadline ?></h2>
                <?php endif; ?>
                
                <div class="ce_text block d-none d-md-block" itemprop="description">
                    <?= $this->teaser ?>
                </div>
                
                <?php if ($this->hasText && $this->hasTeaser): ?> <!-- '&&' instead of '||': weiterlesen nur wenn Teaser und Text -->
                    <p class="more"><?= $this->more ?></p>
                <?php endif; ?>
                
            </div>
        </div>
    </div>
    Geändert von derRenner (20.12.2018 um 16:24 Uhr)
    Grüsse
    Bernhard


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

    Standard

    Hast du die Ausgabe des Authors im Modul aktiviert?

  3. #3
    Community-Moderator & Contao-Urgestein Avatar von derRenner
    Registriert seit
    23.10.2012.
    Ort
    hoRn|waldviertel
    Beiträge
    2.858
    Contao-Projekt unterstützen

    Support Contao

    Standard

    ... uups - ja das war's ...
    vielen DANK!
    Grüsse
    Bernhard


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
  •