Module doesn't add active class on active category url. In file tmpl/default_items.php line 13 there is a code line
if ($_SERVER['REQUEST_URI'] === JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1;
if ($_SERVER['REQUEST_URI'] === JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)))
It should be true but it returns false
var_dump(trim($_SERVER['REQUEST_URI'])); var_dump(trim(JRoute::_(ContentHelperRoute::getCategoryRoute($list[0]->id))));
Get
string(60) "/index.php?option=com_content&view=category&id=10&Itemid=105" string(72) "/index.php?option=com_content&view=category&id=10&Itemid=105"
SEF turned off
change 13 line php code into
if (htmlspecialchars($_SERVER['REQUEST_URI']) === JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"'; ?>> <?php $levelup = $item->level - $startLevel - 1;
Labels |
Added:
?
|
Category | ⇒ | com_modules |
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-12-28 13:59:13 |
Closed_By | ⇒ | franz-wohlkoenig |
Closed_By | franz-wohlkoenig | ⇒ | joomla-cms-bot |
Set to "closed" on behalf of @franz-wohlkoenig by The JTracker Application at issues.joomla.org/joomla-cms/19194