Panneau N0C 04 EN 250 250
Get 15% discount on our partner PlanetHoster with the code PHA-ceikay

Collapsed menu while visiting submenu page (alias)

More
11 years 4 months ago #28363 by kiku90
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.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #28382 by ced1870
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

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago - 11 years 4 months ago #28395 by kiku90
Below is my solution to this problem, for me this's working fine (just place it above "// new method for the active class"):
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: 11 years 4 months ago by kiku90.

Please Log in or Create an account to join the conversation.

More
11 years 4 months ago #28396 by ced1870
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 :(

Joomlack Webmaster and Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.220 seconds

Fast and powerful creation, customizable and responsive.

Read More

We have 770 guests and 5 members online