2014-06-18, 05:00:17
(2014-06-17, 23:22:24)Everyone Wrote: I need to display a menu with child pages of a defined parent. Unfortunately when I go withthen entries of that menu don't get a 'current' class when their corresponding pages are loaded.PHP Code:<?php get_i18n_navigation( 'defined-parrent-slug', 2,2, I18N_SHOW_PAGES ); ?>
I traced the issue to i18n_navigation/frontend.class.php, function getMenu(). There's this line:.PHP Code:$currenturl = $breadcrumbs[ $icu ];
If I change it toeverything seems to work correctly, breadcrumbs are working normally and menu entries get their 'current' class.PHP Code:$currenturl = return_page_slug();
My question is what's the purpose of this line, why was it made like that and what are the consequences of my hack?
The consequence is that some multi level menus will not work correctly any more, e.g. pages that are not in the menu, but whose parent is and should be highlighted (like here) .
The correct way to show child pages is shown here (adjust depending on your hierarchy level).