2 defined('_JEXEC') or die('Restricted access'); // no direct access
3 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
5 <?php echo artxPost(artxPageTitle($this), null); ?>
6 <?php if ($this->params->def('num_leading_articles', 1)) : ?>
7 <?php for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) : ?>
8 <?php if ($i >= $this->total) : break; endif; ?>
10 $this->item =& $this->getItem($i, $this->params);
11 echo $this->loadTemplate('item');
14 <?php else : $i = $this->pagination->limitstart; endif; ?>
17 $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
18 $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles', 4);
19 if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
20 <table width="100%" cellpadding="0" cellspacing="0">
24 if ($this->params->get('multi_column_order')) : // order across as before
25 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
26 if ($z > 0) : $divider = " column_separator"; endif; ?>
28 $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
29 $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
31 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
33 $loop = (($z < $cols)?1:0) + $rows;
35 for ($y = 0; $y < $loop; $y ++) :
36 $target = $i + ($y * $this->params->get('num_columns')) + $z;
37 if ($target < $this->total && $target < ($numIntroArticles)) :
38 $this->item =& $this->getItem($target, $this->params);
39 echo $this->loadTemplate('item');
44 $i = $i + $this->params->get('num_intro_articles') ;
45 else : // otherwise, order down columns, like old category blog
46 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
47 if ($z > 0) : $divider = " column_separator"; endif; ?>
48 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
49 <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
50 if ($i < $this->total && $i < ($numIntroArticles)) :
51 $this->item =& $this->getItem($i, $this->params);
52 echo $this->loadTemplate('item');
62 <?php if ($this->params->def('num_links', 4) && ($i < $this->total)) : ?>
63 <?php $this->links = array_splice($this->items, $i - $this->pagination->limitstart); ?>
64 <?php if (count($this->links) > 0) : ?>
66 <div class="blog_more<?php echo $this->params->get('pageclass_sfx') ?>">
67 <?php echo $this->loadTemplate('links'); ?>
69 <?php echo artxPost(null, ob_get_clean()); ?>
72 <?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) : ?>
75 <p><?php echo $this->pagination->getPagesLinks(); ?></p>
76 <?php if ($this->params->def('show_pagination_results', 1)) : ?>
77 <p><?php echo $this->pagination->getPagesCounter(); ?></p>
80 <?php echo artxPost(null, ob_get_clean()); ?>