2 defined('_JEXEC') or die;
3 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
4 $version = new JVersion();
5 $view = ('1.5' == $version->RELEASE) ? new ArtxContent15($this, $this->params) : new ArtxContent16($this, $this->params);
7 <div class="blog<?php echo $view->pageClassSfx; ?>">
9 <?php if (strlen($this->params->get('page_subheading'))) : ?>
10 <span class="page-subheading"><?php echo $this->escape($this->params->get('page_subheading')); ?></span>
12 <?php if ($this->params->get('show_category_title') && strlen($this->category->title)) : ?>
13 <span class="subheading-category"><?php echo $this->category->title;?></span>
15 <?php if ($this->params->def('show_description', 1) || $this->params->def('show_description_image', 1)) : ?>
16 <div class="category-desc">
17 <?php if ('1.5' == $version->RELEASE) : ?>
18 <?php if ($this->params->get('show_description_image') && $this->category->image) : ?>
19 <img src="<?php echo $this->baseurl . '/' . JComponentHelper::getParams('com_media')->get('image_path') . '/'. $this->category->image; ?>" align="<?php echo $this->category->image_position;?>" hspace="6" alt="" />
21 <?php if ($this->params->get('show_description') && $this->category->description) : ?>
22 <?php echo $this->category->description; ?>
25 <?php if ($this->params->get('show_description_image') && $this->category->getParams()->get('image')) : ?>
26 <img src="<?php echo $this->category->getParams()->get('image'); ?>" alt="" />
28 <?php if ($this->params->get('show_description') && $this->category->description) : ?>
29 <?php echo JHtml::_('content.prepare', $this->category->description); ?>
34 <?php echo artxPost(array('header-text' => $view->pageHeading, 'content' => ob_get_clean())); ?>
35 <?php if ('1.5' != $version->RELEASE) : ?>
36 <?php $leadingcount=0 ; ?>
37 <?php if (!empty($this->lead_items)) : ?>
38 <div class="items-leading">
39 <?php foreach ($this->lead_items as &$item) : ?>
40 <div class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
43 echo $this->loadTemplate('item');
46 <?php $leadingcount++; ?>
51 $introcount = (count($this->intro_items));
54 <?php if (!empty($this->intro_items)) : ?>
55 <?php foreach ($this->intro_items as $key => &$item) : ?>
57 $key= ($key-$leadingcount)+1;
58 $rowcount=( ((int)$key-1) % (int) $this->columns) +1;
59 $row = $counter / $this->columns ;
60 if ($rowcount==1) : ?>
61 <div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row ; ?>">
63 <div class="item column-<?php echo $rowcount;?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>">
66 echo $this->loadTemplate('item');
70 <?php if (($rowcount == $this->columns) or ($counter ==$introcount)): ?>
71 <span class="row-separator"></span>
76 <?php if (!empty($this->link_items)) : ?>
78 <div class="items-more">
79 <?php echo $this->loadTemplate('links'); ?>
81 <?php echo artxPost(ob_get_clean()); ?>
83 <?php if (!empty($this->children[$this->category->id])&& $this->maxLevel != 0) : ?>
85 <div class="cat-children">
86 <h3><?php echo JTEXT::_('JGLOBAL_SUBCATEGORIES'); ?></h3>
87 <?php echo $this->loadTemplate('children'); ?>
89 <?php echo artxPost(ob_get_clean()); ?>
91 <?php if (($this->params->def('show_pagination', 1) == 1 || ($this->params->get('show_pagination') == 2)) && ($this->pagination->get('pages.total') > 1)) : ?>
93 <div class="pagination">
94 <?php if ($this->params->def('show_pagination_results', 1)) : ?>
95 <p class="counter"><?php echo $this->pagination->getPagesCounter(); ?></p>
97 <?php echo $this->pagination->getPagesLinks(); ?>
99 <?php echo artxPost(ob_get_clean()); ?>
102 <table class="blog<?php echo $view->pageClassSfx;?>" cellpadding="0" cellspacing="0" width="100%">
103 <?php if ($this->params->get('num_leading_articles')) : ?>
106 <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
107 <?php if ($i >= $this->total) : break; endif; ?>
110 $this->item =& $this->getItem($i, $this->params);
111 echo $this->loadTemplate('item');
117 <?php else : $i = $this->pagination->limitstart; endif; ?>
120 $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
121 $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles');
122 if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
125 <table width="100%" cellpadding="0" cellspacing="0">
129 if ($this->params->get('multi_column_order')) : // order across, like front page
130 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
131 if ($z > 0) : $divider = " column_separator"; endif; ?>
133 $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
134 $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
137 width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%"
138 class="article_column<?php echo $divider ?>">
140 $loop = (($z < $cols)?1:0) + $rows;
142 for ($y = 0; $y < $loop; $y ++) :
143 $target = $i + ($y * $this->params->get('num_columns')) + $z;
144 if ($target < $this->total && $target < ($numIntroArticles)) :
145 $this->item =& $this->getItem($target, $this->params);
146 echo $this->loadTemplate('item');
151 $i = $i + $this->params->get('num_intro_articles') ;
152 else : // otherwise, order down, same as before (default behaviour)
153 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
154 if ($z > 0) : $divider = " column_separator"; endif; ?>
155 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
156 <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
157 if ($i < $this->total && $i < ($numIntroArticles)) :
158 $this->item =& $this->getItem($i, $this->params);
159 echo $this->loadTemplate('item');
172 <?php if ($this->params->get('num_links') && ($i < $this->total)) : ?>
175 $this->links = array_splice($this->items, $i - $this->pagination->limitstart);
176 echo $this->loadTemplate('links');
178 <?php echo artxPost(ob_get_clean()); ?>
181 $paginationPagesLinks = $this->params->get('show_pagination')
182 ? $this->pagination->getPagesLinks() : '';
183 $paginationPagesCounter = $this->params->get('show_pagination_results')
184 ? $this->pagination->getPagesCounter() : '';
186 <?php if (strlen($paginationPagesLinks) > 0 && strlen($paginationPagesCounter) > 0) : ?>
188 <div id="navigation">
189 <?php if (strlen($paginationPagesLinks) > 0) : ?>
190 <p><?php echo $paginationPagesLinks; ?></p>
192 <?php if (strlen($paginationPagesCounter) > 0) : ?>
193 <p><?php echo $paginationPagesCounter; ?></p>
196 <?php echo artxPost(ob_get_clean()); ?>