Joomla! Template Override:

Sponsorenliste


Hier haben wir ein Override von "com_contact" in der "Category" Ansicht. 

Wenige nutzen die Standard-Kontaktkomponente von Joomla, daher haben wir uns diese zu einer kleinen Sponsorliste umgebaut. Die Sponsoren werden dreispaltig dargestellt und wir benötigen die Felder "Name", "Ort", "Webseite" und das "Bild". 

Die Boxen haben eine min-height von 200px. Solltet Ihr Logos nutzen die höher sind und es zu unschönen Formatierungen kommt, so müsst Ihr die min-height von div.sponsoring ein wenig anpassen. 

Benötigte Override-Dateien


  • <?php
    /**
     * @package Joomla.Site
     * @subpackage com_contact
     *
     * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
     * @license GNU General Public License version 2 or later; see LICENSE.txt
     */
    defined('_JEXEC') or die;
    JHtml::_('behavior.framework');
    $listOrder = $this->escape($this->state->get('list.ordering'));
    $listDirn = $this->escape($this->state->get('list.direction'));
    ?>
    <?php if (empty($this->items)) : ?>
     <p> <?php echo JText::_('COM_CONTACT_NO_CONTACTS'); ?> </p>
    <?php else : ?>
    
    
    <form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm">
     <?php if ($this->params->get('filter_field') != 'hide' || $this->params->get('show_pagination_limit')) : ?>
     <fieldset class="filters btn-toolbar">
     <?php if ($this->params->get('filter_field') != 'hide') : ?>
     <div class="btn-group">
     <label class="filter-search-lbl element-invisible" for="filter-search"><span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span><?php echo JText::_('COM_CONTACT_FILTER_LABEL') . '&#160;'; ?></label>
     <input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC'); ?>" placeholder="<?php echo JText::_('COM_CONTACT_FILTER_SEARCH_DESC'); ?>" />
     </div>
     <?php endif; ?>
    
    
    <?php if ($this->params->get('show_pagination_limit')) : ?>
     <div class="btn-group pull-right">
     <label for="limit" class="element-invisible">
     <?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
     </label>
     <?php echo $this->pagination->getLimitBox(); ?>
     </div>
     <?php endif; ?>
     </fieldset>
     <?php endif; ?> 
     <div class="row">
     <ul class="category list-striped">
     <?php foreach ($this->items as $i => $item) : ?>
    
    
    <?php if (in_array($item->access, $this->user->getAuthorisedViewLevels())) : ?>
     <?php if ($this->items[$i]->published == 0) : ?>
     <li class="system-unpublished cat-list-row<?php echo $i % 3; ?>">
     <?php else: ?>
     <div class="col-xs-12 col-sm-6 col-md-4 col-lg-4 sponsoring">
    
    
    <?php endif; ?>
    
    
    
     <p> 
     <div class="list-title"><?php echo $item->name; ?></div>
     <?php if ($this->params->get('show_image') AND ! empty($item->image)) : ?>
     <img src="/<?php echo $item->image; ?>" class="img-responsive" title="<?php echo ($item->name); ?>" alt="Logo <?php echo $item->name; ?>"/>
     <?php endif; ?>
     <?php if ($this->params->get('show_suburb_headings') AND ! empty($item->suburb)) : ?>
     <span class="fa fa-dot-circle-o"></span>
     <?php echo $item->suburb . ''; ?>
     <?php endif; ?>
     <?php if ($this->params->get('show_webpage') AND ! empty($item->webpage)) : ?>
     | <span class="fa fa-home"></span> <a href="/<?php echo ($item->webpage); ?>" title="<?php echo ($item->webpage); ?>" target="_blank" rel="follow">
     <?php echo 'Website'; ?></a>
     <?php endif; ?>
     </p>
     </div>
     </li>
     <?php endif; ?>
     <?php endforeach; ?>
     </ul>
     </div>
     </form>
    <?php endif;
  • /* SPONSOREN */
    div.sponsoring {min-height: 200px;}
    .list-title {font-weight: 700; border-bottom: 1px solid rgba(244,173,73,1); }
    ul.category.list-striped {padding-left: 0;}





Fehler melden

Bitte beachte unsere Datenschutzerklärung

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