Hallo zusammen,
ich nutze das Template "news_latest.html5" und möchte es so umschreiben, dass ich die Nachrichten als Listen ausgegeben werden.
Ich habe dafür folgenden Code verwendet:
PHP-Code:
<ul class="timeline">
<li class="<?= $this->class ?>">
<div class="timeline-badge"><img src="files/bilder/news/ish.png" width="47" height="40"></div>
<div class="timeline-panel">
<div class="timeline-heading">
<h2><?= $this->linkHeadline ?></h2>
<?php if ($this->hasMetaFields): ?>
<p class="info"><time datetime="<?= $this->datetime ?>"><?= $this->date ?></time> <?= $this->author ?> <?= $this->commentCount ?></p>
<?php endif; ?>
</div>
<div class="timeline-body">
<div class="teaser">
<?= $this->teaser ?>
<?php if ($this->hasText || $this->hasTeaser): ?>
<?php endif; ?>
<p class="more"><?= $this->more ?></p>
</div>
<?php if ($this->addImage): ?>
<figure class="image_container<?= $this->floatClass ?>"<?php if ($this->margin): ?> style="<?= $this->margin ?>"<?php endif; ?>>
<?php if ($this->href): ?>
<a href="<?= $this->href ?>"<?= $this->attributes ?> title="<?= $this->alt ?>">
<?php endif; ?>
<?php $this->insert('picture_default', $this->picture); ?>
<?php if ($this->href): ?>
</a>
<?php endif; ?>
<?php if ($this->caption): ?>
<figcaption class="caption"><?= $this->caption ?></figcaption>
<?php endif; ?>
</figure>
<?php endif; ?>
</div>
</div>
</li>
<ul>
Allerdings wird mir dann das ul-Tag mehrfach verschachtelt ausgegeben.
Ich habe auch schon versucht, eine foreach-Schleife um das li-Tag zu legen, das aber leider zu einem Fehler geführt...
Könntet Ihr mir bitte noch einmal behilflich sein?
MfG
Frank
Lesezeichen