Joomla! Template Override:

Testimonials


Hier haben wir ein Testimonials Override für Euch. Ihr benötigt ein Template Override von "mod_articles_news". 

Im Modul (Beiträge - Newsflash) selber wählt Ihr eine Kategorie für die Testimonials aus. Beitragstitel wird auf "Nein" gesetzt und unter "Erweitert" fügen wir der "Header-Klasse" noch "testimonials" hinzu. Anzahl der Beiträge könnt Ihr hier frei zwischen 1 und 4 wählen. Die Auswahl hat Einfluss auf die Darstellung der responsiven Spalten, basierend auf Bootstrap 3. 

Als Autorname wird das Feld "Autoralias" verwendet. Für die Darstellung des Icons im Headbereich, wird FontAwesome benötigt.

Benötigte Override-Dateien


  • <?php
    /**
     * @package Joomla.Site
     * @subpackage mod_articles_news
     *
     * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
     * @license GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    $itemnr = $params->get('count');
    $col = 0;
    if($itemnr == 1) {
     $col = 12;
    }
    if($itemnr == 2) {
     $col = 6;
    }
    if($itemnr == 3) {
     $col = 4;
    }
    if($itemnr == 4) {
     $col = 3;
    }
    ?>
    <div class="newsflash<?php echo $moduleclass_sfx; ?> row table-row">
     <?php foreach ($list as $item) : ?>
     <div class="col-md-<?php echo $col; ?>">
     <?php require JModuleHelper::getLayoutPath('mod_articles_news', '_item'); ?>
     </div>
     <?php endforeach; ?>
    </div>
  • <?php
    /**
     * @package Joomla.Site
     * @subpackage mod_articles_news
     *
     * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
     * @license GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    $item_heading = $params->get('item_heading', 'h4');
    ?>
    <?php if ($params->get('item_title')) : ?>
    
    
    <<?php echo $item_heading; ?> class="newsflash-title<?php echo $params->get('moduleclass_sfx'); ?>">
     <?php if ($params->get('link_titles') && $item->link != '') : ?>
     <a href="/<?php echo $item->link; ?>">
     <?php echo $item->title; ?>
     </a>
     <?php else : ?>
     <?php echo $item->title; ?>
     <?php endif; ?>
     </<?php echo $item_heading; ?>>
    
    
    <?php endif; ?>
    
    
    <?php if (!$params->get('intro_only')) : ?>
     <?php echo $item->afterDisplayTitle; ?>
    <?php endif; ?>
    
    
    <?php echo $item->beforeDisplayContent; ?>
    
    
    <?php echo $item->introtext; ?>
    <?php echo '<aside class="jover-testimonial-author">' .$item->created_by_alias .'</aside>'; ?>
    
    
    <?php if (isset($item->link) && $item->readmore != 0 && $params->get('readmore')) : ?>
     <?php echo '<a class="readmore" href="' . $item->link . '">' . $item->linkText . '</a>'; ?>
    <?php endif; ?>
  • /* TESTIMONIALS */
    @media only screen and (min-width : 320px) {
     .newsflash {
     border-bottom: 1px solid orange;
     padding-bottom: 10px;
     margin-bottom: 15px;
     }
    
    
    .newsflash p {
     color: #333;
     text-align: justify;
     margin-top: 10px;
     }
    
    
    .newsflash div {
     border-bottom: 1px solid #CCC;
     }
    
    
    .newsflash div:last-child {
     border-bottom: none;
     }
    
    
    .newsflash p::before {
     content: open-quote;
     font-family: serif;
     font-size: 30px;
     font-weight: bold;
     position: relative;
     top: 5px;
     margin-right: 5px;
     }
    
    
    .newsflash p::after {
     content: no-close-quote;
     }
    
    
    h3.testimonials {
     padding: 15px;
     margin-bottom: 0;
     border-bottom: 1px solid orange;
     background: rgb(234,234,234);
     background: -moz-linear-gradient(top, rgba(234,234,234,1) 0%, rgba(252,252,252,1) 100%);
     background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(234,234,234,1)), color-stop(100%,rgba(252,252,252,1)));
     background: -webkit-linear-gradient(top, rgba(234,234,234,1) 0%,rgba(252,252,252,1) 100%);
     background: -o-linear-gradient(top, rgba(234,234,234,1) 0%,rgba(252,252,252,1) 100%);
     background: -ms-linear-gradient(top, rgba(234,234,234,1) 0%,rgba(252,252,252,1) 100%);
     background: linear-gradient(to bottom, rgba(234,234,234,1) 0%,rgba(252,252,252,1) 100%);
     filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eaeaea', endColorstr='#fcfcfc',GradientType=0 );
     }
    
    
    h3.testimonials::before {
     content: "\f0c0";
     font-family: FontAwesome;
     font-style: normal;
     font-weight: normal;
     text-decoration: inherit;
     margin-right: 5px;
    
    
    }
    
    
    aside.jover-testimonial-author {
     color: orange;
     margin-left: 30px;
     margin-bottom: 20px;
     }
    
    
    aside.jover-testimonial-author::before {
     content: "~ ";
     }
    }
    
    
    /* Small Devices, Tablets */
    @media only screen and (min-width : 768px) {
     .table-row {
     display: table;
     table-layout: fixed;
     }
    
    
    .table-row [class^="col-"] {
     display: table-cell;
     float: none;
     }
     .newsflash div {
     border-right: 1px solid #CCC;
     border-bottom: none;
     }
    
    
    .newsflash div:last-child {
     border-right: none;
     border-bottom: none;
     }
     
     .newsflash div:first-child p {padding-left: 15px;}
     .newsflash div:last-child p {padding-right: 15px;}
    }


j!-over




Fehler melden

Bitte beachte unsere Datenschutzerklärung

Alle mit (*) markierten Felder werden benötigt um eine E-Mail zu senden.

E-Mail für Kontakt
Nachricht hier eingeben.
Dieses Feld wird benötigt.