<?php
/**
* @package     Joomla.Site
* @subpackage  com_content
* @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license     GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
$output = '<div class="category-list'.$this->pageclass_sfx.'">';
$jversion = new JVersion;
if (version_compare($jversion->getShortVersion(), '3.0.0', '<')){
if ($this->params->get('show_page_heading')) :
$output .='<h1>'.$this->escape($this->params->get('page_heading')).'</h1>';
endif;
if ($this->params->get('show_category_title', 1) or $this->params->get('page_subheading')) :
$output .='<h2>'.$this->escape($this->params->get('page_subheading'));
if ($this->params->get('show_category_title')) :
$output .='<span class="subheading-category">'.$this->category->title.'</span>';
endif;
$output .='</h2>';	
endif;
if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) :
$output .='<div class="category-desc clearfix">';
if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) :
$output .='<img src="'.$this->category->getParams()->get('image').'" alt=""/>';
endif;
if ($this->params->get('show_description') && $this->category->description) :
$output .=JHtml::_('content.prepare', $this->category->description, '', 'com_content.category');
endif;
$output .='</div>';
endif;
$output .='<div class="cat-items">'.$this->loadTemplate('articles').'</div>';
if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) :
$output .='<div class="cat-children">';
if ($this->params->get('show_category_heading_title_text', 1) == 1) :
$output .='<h3>'.JTEXT::_('JGLOBAL_SUBCATEGORIES').'</h3>';
endif;
$output .=$this->loadTemplate('children');
$output .='</div>';
endif;
}else{
$this->subtemplatename = 'articles';
$output .= JLayoutHelper::render('joomla.content.category_default', $this);
}
$output .= '</div>';
echo $output;
?>