Hallo,
ich habe es immer noch nicht geschafft das Template anzupassen.
Das hier ist das Ausgangstemplate (news4ward_list_item.xhtml). Es enthält handelt sich hierbei um eine Listenansicht der News4ward Beiträge mit Datum, Author, Titel, Teaserimage und dem Teasertext. Leider fehlen hier der Content-Text und die Social Buttons:
PHP-Code:
<div class="layout_short news4ward_list block<?php echo $this->class; ?>">
<?php if ($this->hasMetaFields): ?>
<p class="info"><?php echo $this->date; ?> <?php echo $this->author; ?></p>
<?php endif; ?>
<h2><a href="<?php echo $this->link; ?>"><?php echo $this->title; ?></a></h2>
<?php if(!empty($this->subheadline)): ?>
<h3><?php echo $this->subheadline; ?></h3>
<?php endif;?>
<div class="teaser">
<?php if(!empty($this->teaserImage)): ?>
<div class="image_container">
<img src="<?php echo $this->teaserImage; ?>" alt="<?php echo $this->title; ?>"/>
<?php if ($this->teaserImageCaption): ?>
<div class="caption" style="width:<?php echo $this->arrSize[0]; ?>px"><?php echo $this->teaserImageCaption; ?></div>
<?php endif; ?>
</div>
<?php endif; ?>
<?php echo $this->teaser; ?>
</div>
<a href="<?php echo $this->link; ?>" class="more">Weiterlesen...</a>
</div>
Hier ist das andere Template (mod_news4ward_reader.xhtml). Hierbei handelt es sich um die Artikelansicht aus News4ward (Beitragsleser Modul). Diese Ansicht enthält Datum, Author, Titel, Content-Text und die Social Buttons, also genau das was ich im oberen Template gerne hätte:
PHP-Code:
<div class="<?php echo $this->class; ?> block"<?php echo $this->cssID; ?><?php if ($this->style): ?> style="<?php echo $this->style; ?>"<?php endif; ?>>
<?php if ($this->headline): ?>
<<?php echo $this->hl; ?>><?php echo $this->headline; ?></<?php echo $this->hl; ?>>
<?php endif; ?>
<?php if ($this->hasMetaFields): ?>
<p class="info"><?php echo $this->date; ?> <?php echo $this->author; ?></p>
<?php endif; ?>
<h1><?php echo $this->title;?></h1>
<?php if(!empty($this->subheadline)): ?>
<h2><?php echo $this->subheadline; ?></h2>
<?php endif;?>
<?php echo $this->content; ?>
<?php if(!empty($this->socialButtons)): ?>
<div class="socialButtons">
<?php if(in_array('facebook',$this->socialButtons)): ?>
<span class="facebook">
<a href="https://www.facebook.com/sharer.php?display=popup&u=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>&t=<?php echo urlencode($this->title); ?>" rel="nofollow" title="Auf Facebook teilen" target="blank" onclick="window.open(this.href, '', 'width=760,height=570,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'); return false;"><img src="system/modules/news4ward/html/social/facebook.png" alt="Facebook" width="30" height="30"/></a>
</span>
<?php endif; ?>
<?php if(in_array('twitter',$this->socialButtons)): ?>
<span class="twitter">
<a href="http://twitter.com/share?url=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>&text=<?php echo urlencode($this->title); ?>" rel="nofollow" title="twittern" target="blank" onclick="window.open(this.href, '', 'width=800,height=600,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'); return false;"><img src="system/modules/news4ward/html/social/twitter.png" alt="Twitter" width="30" height="30"/></a>
</span>
<?php endif; ?>
<?php if(in_array('google',$this->socialButtons)): ?>
<span class="googleplus">
<a href="https://plusone.google.com/_/+1/confirm?hl=de&url=<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>" rel="nofollow" title="Auf Google+ teilen" target="blank" onclick="window.open(this.href, '', 'width=800,height=600,modal=yes,left=100,top=50,location=no,menubar=no,resizable=yes,scrollbars=yes,status=no,toolbar=no'); return false;"><img src="system/modules/news4ward/html/social/google.png" alt="Google+" width="30" height="30"/></a>
</span>
<?php endif; ?>
<?php if(in_array('email',$this->socialButtons)): ?>
<span class="email">
<a href="mailto:hier-empfänger@einsetzen.de?subject=Empfehlung:%20<?php echo rawurlencode($this->title); ?>&body=Dieser%20Artikel%20könnte%20Sie%20interessieren:%0A<?php echo urlencode($this->Environment->base . $this->Environment->request); ?>%0A%0A<?php echo rawurlencode($this->teaser);?>"><img src="system/modules/news4ward/html/social/mail.png" alt="Per E-Mail empfehlen" width="30" height="30"/></a>
</span>
<?php endif; ?>
</div>
<?php endif; ?>
<?php if($this->prevArticle): ?>
<span class="prevArticle"><a href="<?php echo $this->prevArticle['href']; ?>">« <?php echo $this->prevArticle['title']; ?></a></span>
<?php endif; ?>
<?php if($this->nextArticle): ?>
<span class="nextArticle"><a href="<?php echo $this->nextArticle['href']; ?>"><?php echo $this->nextArticle['title']; ?> »</a></span>
<?php endif; ?>
</div>
Ich würde gerne aus dem oberen Template den Teasertext und das Teaserbild entfernen, und stattdessen zusätzlich den Content-Text inkl. Content-Image (anstelle des Teasertextes einsetzen), sowie die Socialbuttons hinzufügen. So dass, die kompletten Artikel als Listenansicht dargestellt werden.
Hat jemand eine Idee?
LG Hans
Lesezeichen