2 defined('_JEXEC') or die;
4 require_once dirname(__FILE__) . str_replace('/', DIRECTORY_SEPARATOR, '/../../../functions.php');
6 $view = new ArtxContent15($this, $this->params);
8 echo $view->beginPageContainer('blog-featured');
9 if ($view->showPageHeading)
10 echo $view->pageHeading();
12 if ($this->params->def('num_leading_articles', 1)) :
15 <div class="items-leading">
17 for ($i = $this->pagination->limitstart; $i < ($this->pagination->limitstart + $this->params->get('num_leading_articles')); $i++) :
18 if ($i >= $this->total) : break; endif;
20 <div class="leading-<?php echo $leadingcount; ?>">
22 $this->item =& $this->getItem($i, $this->params);
23 echo $this->loadTemplate('item');
33 $i = $this->pagination->limitstart;
36 $startIntroArticles = $this->pagination->limitstart + $this->params->get('num_leading_articles');
37 $numIntroArticles = $startIntroArticles + $this->params->get('num_intro_articles', 4);
38 if (($numIntroArticles != $startIntroArticles) && ($i < $this->total)) : ?>
39 <table width="100%" cellpadding="0" cellspacing="0">
43 if ($this->params->def('multi_column_order', 1)) : // order across as before
44 for ($z = 0; $z < $this->params->def('num_columns', 2); $z ++) :
45 if ($z > 0) : $divider = " column_separator"; endif; ?>
47 $rows = (int) ($this->params->get('num_intro_articles', 4) / $this->params->get('num_columns'));
48 $cols = ($this->params->get('num_intro_articles', 4) % $this->params->get('num_columns'));
50 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
52 $loop = (($z < $cols)?1:0) + $rows;
54 for ($y = 0; $y < $loop; $y ++) :
55 $target = $i + ($y * $this->params->get('num_columns')) + $z;
56 if ($target < $this->total && $target < ($numIntroArticles)) :
57 $this->item =& $this->getItem($target, $this->params);
58 echo $this->loadTemplate('item');
63 $i = $i + $this->params->get('num_intro_articles') ;
64 else : // otherwise, order down columns, like old category blog
65 for ($z = 0; $z < $this->params->get('num_columns'); $z ++) :
66 if ($z > 0) : $divider = " column_separator"; endif; ?>
67 <td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
68 <?php for ($y = 0; $y < ($this->params->get('num_intro_articles') / $this->params->get('num_columns')); $y ++) :
69 if ($i < $this->total && $i < ($numIntroArticles)) :
70 $this->item =& $this->getItem($i, $this->params);
71 echo $this->loadTemplate('item');
82 if ($this->params->def('num_links', 4) && ($i < $this->total)) :
83 $this->links = array_splice($this->items, $i - $this->pagination->limitstart);
84 if (count($this->links) > 0) :
87 <div class="items-more">
88 <?php echo $this->loadTemplate('links'); ?>
91 echo artxPost(ob_get_clean());
95 if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->get('pages.total') > 1)) :
99 <?php if ($this->params->def('show_pagination_results', 1)) : ?>
100 <p><?php echo $this->pagination->getPagesCounter(); ?></p>
102 <p><?php echo $this->pagination->getPagesLinks(); ?></p>
105 echo artxPost(ob_get_clean());
107 echo $view->endPageContainer();