Hi Leute,
ich stelle gerade von Contao 4 auf Contao 5 um.
Wie können in der Teaser-Anzeige von Nachrichten Downloads gleich mit angezeigt werden?
Unbenannt-4.jpg
Ich probier gerade das Template " news_latest" anzupassen
PHP-Code:
<div class="layout_latest arc_<?= $this->archive->id ?> block<?= $this->class ?>">
<p class="info"><time datetime="<?= $this->datetime ?>"><?= $this->date ?></time> <?= $this->author ?></p>
<?php if ($this->addImage): ?>
<?php $this->insert('image', $this->arrData); ?>
<?php endif; ?>
<h2><?= $this->linkHeadline ?></h2>
<div class="ce_text block teaser">
<?= $this->teaser ?>
<?php if ($this->hasText || $this->hasTeaser): ?>
<p class="more"><?= $this->more ?></p>
<?php endif; ?>
</div><!-- Ende von .teaser -->
<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><?= Image::getHtml($enclosure['icon'], '', 'class="mime_icon"') ?> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>
</div>
<?php
// This template is used as a news list template by default, so we only add
// JSON-LD data in case this is a news article without a reader
if (!$this->hasReader) {
$this->addSchemaOrg($this->getSchemaOrgData());
}
Es kommt dann die Fehlermeldung:
Unbenannt-3.jpg
Hier die komplette Zeile 23:
PHP-Code:
<p><?= Image::getHtml($enclosure['icon'], '', 'class="mime_icon"') ?> <a href="<?= $enclosure['href'] ?>" title="<?= $enclosure['title'] ?>"><?= $enclosure['link'] ?> <span class="size">(<?= $enclosure['filesize'] ?>)</span></a></p>
Ist da was neu zu beachten in Contao 5 ?
Lesezeichen