Permalink
Browse files

[mod_articles_latest/news] Featured articles not shown

  • Loading branch information...
SharkyKZ committed Aug 1, 2018
1 parent 9b9be8f commit 5c282dbd6676bdd7c4287c3def35299cb7fd43a2
Showing with 26 additions and 22 deletions.
  1. +13 −11 modules/mod_articles_latest/helper.php
  2. +13 −11 modules/mod_articles_news/helper.php
@@ -84,18 +84,20 @@ public static function getList(&$params)
// Filter by language
$model->setState('filter.language', $app->getLanguageFilter());
// Featured switch
switch ($params->get('show_featured'))
// Featured switch
$featured = $params->get('show_featured', '');
if ($featured === '')
{
case 1 :
$model->setState('filter.featured', 'only');
break;
case 0 :
$model->setState('filter.featured', 'hide');
break;
default :
$model->setState('filter.featured', 'show');
break;
$model->setState('filter.featured', 'show');
}
elseif ($featured)
{
$model->setState('filter.featured', 'only');
}
else
{
$model->setState('filter.featured', 'hide');
}
// Set ordering
@@ -61,18 +61,20 @@ public static function getList(&$params)
// Filer by tag
$model->setState('filter.tag', $params->get('tag', array()));
// Featured switch
switch ($params->get('show_featured'))
// Featured switch
$featured = $params->get('show_featured', '');
if ($featured === '')
{
$model->setState('filter.featured', 'show');
}
elseif ($featured)
{
$model->setState('filter.featured', 'only');
}
else
{
case 1 :
$model->setState('filter.featured', 'only');
break;
case 0 :
$model->setState('filter.featured', 'hide');
break;
default :
$model->setState('filter.featured', 'show');
break;
$model->setState('filter.featured', 'hide');
}
// Set ordering

0 comments on commit 5c282db

Please sign in to comment.