Collapsed menu while visiting submenu page (alias)
Replied by kiku90 on topic Collapsed menu while visiting submenu page (alias)
Posted 8 years 9 months ago #28363
In the first prntscr there's a menu which contains position marked red (it's single article menu type).
In the second prntscr there's a menu which contains alias to position from first prntscr. This is a menu which doesn't expand automatically while visiting alias.
In the second prntscr there's a menu which contains alias to position from first prntscr. This is a menu which doesn't expand automatically while visiting alias.
by kiku90
Please Log in or Create an account to join the conversation.
Replied by ced1870 on topic Collapsed menu while visiting submenu page (alias)
Posted 8 years 9 months ago #28382
I have reproduced the issue by my side but I also found that the native joomla menu module has the same issue.
So for now I can not solve this quickly because it would need a global recoding of the active tree ...
the problem is that the parent item is not recognized as being in the active tree, because the tree is based on the original item and not the alias
So for now I can not solve this quickly because it would need a global recoding of the active tree ...
the problem is that the parent item is not recognized as being in the active tree, because the tree is based on the original item and not the alias
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
Replied by kiku90 on topic Collapsed menu while visiting submenu page (alias)
Posted 8 years 9 months ago #28395
Below is my solution to this problem, for me this's working fine (just place it above "// new method for the active class"):
let me know what do you think?
Code:
if($item->type == 'alias' || $item->type == 'heading') {
$db = JFactory::getDBO();
$q = $db->getQuery(true);
$q->select($db->quoteName('params'));
$q->from($db->quoteName('#__menu'));
$q->where($db->quoteName('parent_id').' = '.$db->quote($item->id));
$db->setQuery($q);
$aliasparams = $db->loadColumn();
foreach($aliasparams as $aliasparam) {
$aliasparamsdecode = json_decode($aliasparam);
if($aliasparamsdecode->aliasoptions == $active_id) {
$item->classe .= ' active';
$item->isactive = true;
}
}
}
let me know what do you think?
Last Edit:8 years 9 months ago
by kiku90
Last edit: 8 years 9 months ago by kiku90.
Please Log in or Create an account to join the conversation.
Replied by ced1870 on topic Collapsed menu while visiting submenu page (alias)
Posted 8 years 9 months ago #28396
wow...
if it works for you, ok, but I don't think that I will include it immediately. I have to test and find why the joomla system is not working correctly
the best thing would be to open a ticket on the joomla debug, but I'm actually too busy to work deeper on this
if it works for you, ok, but I don't think that I will include it immediately. I have to test and find why the joomla system is not working correctly
the best thing would be to open a ticket on the joomla debug, but I'm actually too busy to work deeper on this
Joomlack Webmaster and Developer
by ced1870
Please Log in or Create an account to join the conversation.
Time to create page: 0.679 seconds