Notice: Trying to access array offset on value of type bool in jbuniversal/templates/auto/renderer/category/_default.php on line 49
<?php
/**
* JBZoo App is universal Joomla CCK, application for YooTheme Zoo component
*
* @package jbzoo
* @version 2.x Pro
* @copyright Copyright © JBZoo.com, All rights reserved.
* @coder Denis Smetannikov <denis@jbzoo.com>
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
$this->app->jbdebug->mark('layout::category::start');
// set vars
$category = $vars['object'];
$title = $this->app->string->trim($vars['params']->get('content.category_title', ''));
$subTitle = $this->app->string->trim($vars['params']->get('content.category_subtitle', ''));
$image = $this->app->jbimage->get('category_image', $vars['params']);
$title = $title ? $title : $category->name;
$bootstrap = $this->app->jbbootstrap;
$rowClass = $bootstrap->getRowClass();
$subCatsCol = 4;
$parentCat = $category->getParent();
$categoryName = ($parentCat->alias !== 'cars' && $parentCat->alias !== '_root') ? $parentCat->name . ' / ' . $title : $title;
if ((int)$vars['params']->get('template.category_show', 1)) : ?>
<div class="category alias-<?php echo $category->alias; ?> clearfix">
<?php if ((int)$vars['params']->get('template.category_title_show', 1)) : ?>
<h1 class="title">
<?php echo $categoryName ?>
<?php if ($count = $category->itemCount()) : ?>
<span class="title-count">(<?php echo JText::sprintf('JBZOO_ADS_CATEGORY_TOTAL', $count); ?>)</span>
<?php endif; ?>
</h1>
<?php endif; ?>
<?php if ((int)$vars['params']->get('template.category_subtitle', 1) && !empty($subTitle)) : ?>
<h2 class="subtitle"><?php echo $subTitle; ?></h2>
<?php endif; ?>
<?php if ((int)$vars['params']->get('template.category_image', 1) && $image['src']) : ?>
<div class="<?php echo $rowClass; ?>">
<div class="<?php echo $bootstrap->gridClass(2); ?>">
<?php if ((int)$vars['params']->get('template.category_image', 1) && $image['src']) : ?>
<div class="image-full">
<img src="<?php echo $image['src']; ?>" <?php echo $image['width_height']; ?>
title="<?php echo $category->name; ?>" alt="<?php echo $category->name; ?>" class="thumbnail"/>
</div>
<?php endif; ?>
</div>
<?php
$rowCount = 0;
$childRows = array_chunk($category->getChildren(), $subCatsCol);
if (!empty($childRows)) : ?>
<div class="<?php echo $bootstrap->gridClass(5); ?>">
<div class="category-subs">
<h4 class="category-subs-title"><?php echo JText::_('JBZOO_ADS_CAR_MODELS'); ?></h4>
<div class="<?php echo $rowClass; ?>">
<?php
foreach ($childRows as $children) {
$rowCount++;
echo '<div class="sub-row clearfix row-id-' . $rowCount . '">';
foreach ($children as $child) {
$childLink =
'<a href="' . $this->app->route->category($child) . '" title="' . $child->name . '"> ' .
$child->name .
'</a>';
echo '<div class="' . $bootstrap->columnClass($subCatsCol) . '">' .
$childLink . ' <span class="sub-count">(' . $child->itemCount() . ')</span>' .
'</div>';
}
echo '</div>';
}
?>
</div>
</div>
</div>
<?php endif; ?>
<div class="<?php echo $bootstrap->gridClass(5); ?>">
<?php if ((int)$vars['params']->get('template.category_teaser_text', 1) && $vars['params']->get('content.category_teaser_text', '')) : ?>
<div class="description-teaser">
<?php echo $vars['params']->get('content.category_teaser_text', ''); ?>
</div>
<?php endif; ?>
</div>
</div>
<?php endif; ?>
<?php if ((int)$vars['params']->get('template.category_text', 1) && $category->description) : ?>
<div class="description-full"><?php echo $category->getText($category->description); ?></div>
<?php endif; ?>
</div>
<?php else: ?>
<div class="category alias-<?php echo $category->alias; ?> well">
<?php if ((int)$vars['params']->get('template.category_title_show', 1)) : ?>
<h1 class="title"><?php echo $title; ?></h1>
<?php endif; ?>
</div>
<?php endif; ?>
<?php
$this->app->jbdebug->mark('layout::category::finish');