The li element with the same category should have a 'active'-class
Because of the difference in $_SERVER['REQUEST_URI'] and the ContentHelperRoute::getCategoryRoute in HTML characters, the li-element does not get the class 'active'.
File /modules/mod_articles_categories/tmp/default_items.php, replace the if-statement on ~ 13
Add:
$activeCatId = '';
if(JFactory::getApplication()->input->get('view') === 'category' )
{
$activeCatId = JFactory::getApplication()->input->get('id');
}
And replace
<li <?php if ($_SERVER['REQUEST_URI'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"';?>> <?php $levelup = $item->level - $startLevel - 1; ?>
with:
<li <?php if (!empty($activeCatId) && $activeCatId == $item->id) echo ' class="active"';?>> <?php $levelup = $item->level - $startLevel - 1; ?>
Category | ⇒ | Front End Modules |
Labels |
Added:
?
|
Category | Front End Modules | ⇒ | Front End Modules Router / SEF |
This module displays a list of categories from one parent category.
In your example above you are in the parent category so it is not expected that it will display the name of that category. It is only intended to display any subcategories
Status | New | ⇒ | Expected Behaviour |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-11 09:51:50 |
Closed_By | ⇒ | brianteeman |
Closed as expected behaviour
Hi @LaurensGoedel can you send your fixes as patch against staging? If you need help see: https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/7935.