Hallo zusammen,
wenn Ihr Eure News schon einmal mit Galerie (newsgallery) und Tags (tags_news) verwenden wolltet, werdet Ihr schnell gemerkt haben, dass es dafür kein kombiniertes Template für den Newsreader gibt.
Also hab ich mal eins zusammengebastelt, um beide Funktionen unter einen Hut zu bekommen.
news_full_tags_gallery.tpl:
PHP-Code:
<div class="layout_full block<?php echo $this->class; ?>">
<h1><?php echo $this->newsHeadline; ?></h1>
<?php if ($this->hasMetaFields): ?>
<p class="info"><?php echo $this->parseDate("d. F Y", $this->timestamp); ?> <?php echo $this->author; ?> <?php echo $this->commentCount; ?></p>
<?php endif; ?>
<?php if ($this->hasSubHeadline): ?>
<h2><?php echo $this->subHeadline; ?></h2>
<?php endif; ?>
<div class="ce_text">
<?php if ($this->addImage): ?>
<div class="image_container"<?php if ($this->margin || $this->float): ?> style="<?php echo $this->margin . $this->float; ?>"<?php endif; ?>>
<?php if ($this->fullsize): ?><a href="<?php echo $this->href; ?>" title="<?php echo $this->alt; ?>" rel="lightbox"><?php endif; ?>
<img src="<?php echo $this->src; ?>"<?php echo $this->imgSize; ?> alt="<?php echo $this->alt; ?>" /><?php if ($this->fullsize): ?></a><?php endif; ?>
<?php if ($this->caption): ?>
<div class="caption"><?php echo $this->caption; ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php echo $this->text; ?>
</div>
<?php if ($this->enclosure): ?>
<div class="enclosure">
<?php foreach ($this->enclosure as $enclosure): ?>
<p><img src="<?php echo $enclosure['icon']; ?>"<?php echo $enclosure['size']; ?> alt="<?php echo $enclosure['title']; ?>" class="mime_icon" /> <a href="<?php echo $enclosure['href']; ?>" title="<?php echo $enclosure['title']; ?>"><?php echo $enclosure['link']; ?></a></p>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if ($this->addGallery):
$objGallery = new NewsGallery($this);
echo $objGallery->generate();
endif; ?>
<?php if ($this->showTags): ?>
<?php if (count($this->taglist)): ?>
<ul class="tag-chain">
<?php $counter = 0; foreach ($this->taglist as $tag): ?>
<li class="tag-chain-item<?php if ($counter == 0) echo ' first'; ?><?php if ($counter == count($this->taglist)-1) echo ' last'; ?><?php if ($this->showTagClass) echo ' ' . $tag['class']; ?>"><?php echo $tag['url']; ?></li>
<?php $counter++; endforeach; ?>
</ul>
<?php endif; ?>
<?php endif; ?>
</div>
Es gibt noch eine weitere Anpassung: In der Überschrift wird das Datum als Wort ausgeschrieben und die Uhrzeit nicht angezeigt. Geschmackssache
Ich hoffe, das Template ist hilfreich für Euch.
Viele Grüße
Alex
Lesezeichen