1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-29 17:19:56 +02:00

News Grid Upgrades (TBD)

This commit is contained in:
Cameron
2017-02-06 19:27:23 -08:00
parent 780123f5de
commit cf43841e27
8 changed files with 131 additions and 26 deletions

View File

@@ -715,11 +715,18 @@ class e_news_tree extends e_front_tree_model
$start = $parser->parseTemplate($template['start'], true, $vars); // must be here in case {SETIMAGE} is present and used for items below.
}
$featuredCount = !empty($parms['featured']) ? intval($parms['featured']) : 0;
e107::getDebug()->log("Featured Count: ".$featuredCount);
foreach ($items as $news)
{
$vars->counter = $i;
$batch->setScVar('news_item', $news->getData());
$ret[] = $parser->parseTemplate($template['item'], true, $batch, $vars);
$tmpl = (isset($template['featured']) && $i <= $featuredCount) ? 'featured' : 'item';
$ret[] = $parser->parseTemplate($template[$tmpl], true, $batch, $vars);
$i++;
}
@@ -912,6 +919,8 @@ class e_news_category_tree extends e_front_tree_model
return '';
}
$ret = array();
$tp = e107::getParser();
@@ -926,7 +935,8 @@ class e_news_category_tree extends e_front_tree_model
}
$bullet = defined('BULLET') ? THEME_ABS.'images/'.BULLET : THEME_ABS.'images/bullet2.gif';
$obj = new e_vars(array('bullet' => $bullet));
foreach ($this->getTree() as $cat)
{
$obj->active = '';
@@ -934,8 +944,9 @@ class e_news_category_tree extends e_front_tree_model
{
$obj->active = ' active';
}
$ret[] = $cat->toHTML($template['item'], $parsesc, $obj);
}
if($ret)