1<?php
2/**
3 * @package     Joomla.Site
4 * @subpackage  Templates.beez3
5 *
6 * @copyright   Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
7 * @license     GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10defined('_JEXEC') or die;
11
12$app = JFactory::getApplication();
13$templateparams = $app->getTemplate(true)->params;
14
15JHtml::addIncludePath(JPATH_COMPONENT . '/helpers');
16JHtml::_('behavior.caption');
17
18$cparams = JComponentHelper::getParams('com_media');
19
20// If the page class is defined, add to class as suffix.
21// It will be a separate class if the user starts it with a space
22?>
23<section class="blog<?php echo $this->pageclass_sfx;?>">
24<?php if ($this->params->get('show_page_heading') != 0) : ?>
25<h1>
26	<?php echo $this->escape($this->params->get('page_heading')); ?>
27</h1>
28<?php endif; ?>
29
30<?php if ($this->params->get('show_category_title')) : ?>
31<h2 class="subheading-category">
32	<?php echo JHtml::_('content.prepare', $this->category->title, '', 'com_content.category.title'); ?>
33</h2>
34<?php endif; ?>
35
36<?php if ($this->params->get('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
37	<div class="category-desc">
38	<?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
39		<img src="<?php echo $this->category->getParams()->get('image'); ?>"/>
40	<?php endif; ?>
41	<?php if ($this->category->description && $this->params->get('show_description')) : ?>
42		<?php echo JHtml::_('content.prepare', $this->category->description, '', 'com_content.category'); ?>
43	<?php endif; ?>
44	<div class="clr"></div>
45	</div>
46<?php endif; ?>
47
48<?php if (empty($this->lead_items) && empty($this->link_items) && empty($this->intro_items)) : ?>
49	<?php if ($this->params->get('show_no_articles', 1)) : ?>
50		<p><?php echo JText::_('COM_CONTENT_NO_ARTICLES'); ?></p>
51	<?php endif; ?>
52<?php endif; ?>
53
54<?php $leadingcount = 0; ?>
55<?php if (!empty($this->lead_items)) : ?>
56<div class="items-leading">
57	<?php foreach ($this->lead_items as &$item) : ?>
58		<article class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? 'system-unpublished' : null; ?>">
59			<?php
60				$this->item = &$item;
61				echo $this->loadTemplate('item');
62			?>
63		</article>
64		<?php $leadingcount++; ?>
65	<?php endforeach; ?>
66</div>
67<?php endif; ?>
68<?php if (!empty($this->intro_items)) : ?>
69	<?php $introcount = count($this->intro_items); ?>
70	<?php $counter = 0; ?>
71	<?php foreach ($this->intro_items as $key => &$item) : ?>
72		<?php $rowcount = ((int) $key % (int) $this->columns) + 1; ?>
73		<?php if ($rowcount === 1) : ?>
74			<?php $row = $counter / $this->columns; ?>
75			<div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?>">
76		<?php endif; ?>
77		<article class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
78		<?php
79			$this->item = &$item;
80			echo $this->loadTemplate('item');
81		?>
82		</article>
83		<?php $counter++; ?>
84		<?php if ($rowcount === (int) $this->columns or $counter === $introcount) : ?>
85			<span class="row-separator"></span>
86			</div>
87		<?php endif; ?>
88	<?php endforeach; ?>
89
90<?php endif; ?>
91
92<?php if (!empty($this->link_items)) : ?>
93	<?php echo $this->loadTemplate('links'); ?>
94<?php endif; ?>
95
96<?php if ($this->params->get('maxLevel') != 0 && is_array($this->children[$this->category->id]) && count($this->children[$this->category->id]) > 0) : ?>
97	<div class="cat-children">
98
99	<?php if ($this->params->get('show_category_heading_title_text', 1) == 1) : ?>
100		<h3>
101			<?php echo JText::_('JGLOBAL_SUBCATEGORIES'); ?>
102		</h3>
103	<?php endif; ?>
104	<?php echo $this->loadTemplate('children'); ?>
105	</div>
106<?php endif; ?>
107
108<?php if ($this->pagination->pagesTotal > 1 && ($this->params->def('show_pagination', 1) == 1 || $this->params->get('show_pagination') == 2)) : ?>
109	<div class="pagination">
110	<?php if ($this->params->def('show_pagination_results', 1)) : ?>
111		<p class="counter">
112		<?php echo $this->pagination->getPagesCounter(); ?>
113		</p>
114	<?php endif; ?>
115	<?php echo $this->pagination->getPagesLinks(); ?>
116	</div>
117<?php endif; ?>
118
119</section>
120