
Лучший Ответ Tunga , 17 February 2017 - 18:39
Нужен шаблон для подкатегорий directory.php
Можете взять его в Демо авто в папке \media\zoo\applications\jbuniversal\templates\auto\renderer\subcategory\directory.php
скопировать ваш сайт\media\zoo\applications\jbuniversal\templates\ваш шаблон\renderer\subcategory\directory.php
Затем в настройках каталога выбрать
-= Шаблоны категории =-
Подкатегория: Директория
directory.php
<?php /** * JBZoo App is universal Joomla CCK, application for YooTheme Zoo component * * @package jbzoo * @version 2.x Pro * @author JBZoo App http://jbzoo.com * @copyright Copyright (C) JBZoo.com, All rights reserved. * @license http://jbzoo.com/license-pro.php JBZoo Licence * @coder Denis Smetannikov <denis@jbzoo.com> */ // no direct access defined('_JEXEC') or die('Restricted access'); // set vars $subcategory = $vars['object']; $params = $subcategory->getParams('site'); $link = $this->app->route->category($subcategory); $task = $this->app->jbrequest->get('task', 'category'); $bootstrap = $this->app->jbbootstrap; // teaser content $text = $params->get('content.category_teaser_text', ''); $imageAlign = $params->get('template.subcategory_teaser_image_align', 'left'); // items $itemsOrder = $params->get('config.item_order', 'none'); $maxItems = $params->get('template.subcategory_items_count', 5); $showCount = $params->get('template.subcategory_items_count_show', 1); $items = array(); $countItems = 0; if ($showCount || $maxItems != "0" || $maxItems == "-1") { $items = JBModelCategory::model()->getItemsByCategory($subcategory->application_id, $subcategory->id, $itemsOrder, $maxItems); $countItems = $subcategory->itemCount(); } $image = $this->app->jbimage->get('category_teaser_image', $params); ?> <div class="subcategory subcategory-<?php echo $subcategory->alias; ?>"> <div class="<?php echo $bootstrap->getRowClass(); ?>"> <?php if ($vars['params']->get('template.subcategory_teaser_image', 1) && $image['src']) : ?> <div class="subcategory-image <?php echo $bootstrap->gridClass(4); ?>"> <a href="<?php echo $link; ?>" title="<?php echo $subcategory->name; ?>"><img src="<?php echo $image['src']; ?>" <?php echo $image['width_height']; ?> alt="<?php echo $subcategory->name; ?>" title="<?php echo $subcategory->name; ?>" /></a> </div> <?php endif; ?> <div class="<?php echo $bootstrap->gridClass(8); ?>"> <h2 class="subcategory-title"> <a href="<?php echo $link; ?>" title="<?php echo $subcategory->name; ?>"><?php echo $subcategory->name; ?></a> <?php if ($showCount && $countItems != 0) : ?> <span>(<?php echo $countItems; ?>)</span> <?php endif; ?> </h2> <div class="clear clr"></div> <?php if ($vars['params']->get('template.subcategory_teaser_text', 1) && strlen($text) > 0) : ?> <div class="subcategory-description"><?php echo $text; ?></div> <?php endif; ?> <?php $i = 0; $childCategories = $subcategory->getChildren(); $childCount = count($childCategories); if ($childCount > 0) { $columns = 3; ?> <ul class="child-list list-inline"> <?php foreach ($childCategories as $child) { $i++; $childLink = '<a href="' . $this->app->route->category($child) . '" title="' . $child->name . '">' . $child->name . '</a>'; $childLink .= ' <span>(' . $child->itemCount() . ')</span>'; if ($childCount !== $i) { $childLink .= ','; } echo '<li>' . $childLink . '</li>'; } ?> </ul><?php } ?> </div> </div> <?php if (in_array($task, array('category', 'frontpage'))) : ?> <?php if ($maxItems != 0 && count($items) > 0) : ?> <div class="clear clr"></div> <div class="subcategory-items"> <?php foreach ($items as $item) { echo $this->app->jblayout->renderItem($item, 'subcategory_item'); } ?> </div> <?php endif; ?> <?php endif; ?> <div class="clear clr"></div> </div>
