2016-04-09, 00:18:49
(This post was last modified: 2016-04-09, 00:22:33 by lokothodida.)
(2016-04-08, 17:48:15)smsHH Wrote: Hello,
I have a question on the mutlilevel navigation. Is it possible to have the parent page button also on the menu on the left side?
Like so (e.g. Btn 4):
Code:Top level menu:
+---------------------------------------+
| Btn 1 | Btn 2 | Btn 3 | Btn 4 | Btn 5 |
+-----------------------+ Sub 1 +-------+
| Sub 2 |
| Sub 3 |
+-------+
Left side menu
+-------+
| Btn 4 |
| Sub 1 |
| Sub 2 |
| Sub 3 |
| Sub 4 |
+-------+
Btn 4 should be selected in the left menu when I click on Btn 4 in the main menu. Btn 4 in the main menu should also stay highlighted/selected when the sub items are clicked.
For that I am using
PHP Code:<?php get_i18n_navigation(return_page_slug(),0,99, I18N_SHOW_MENU); ?>
which works great.
Thank you for your help and have a good day,
Stefan
You can add classes to the elements in the menu with components.
To show the left side menu, you can do something like this:
PHP Code:
<?php
$slug = return_page_slug(); // current page slug
$parent = returnPageField($slug, 'parent'); // find the parent
$parent = $parent ? $parent : $slug; // if there is no parent, use current page
// Main Menu
get_i18n_navigation($slug, 0, 99, I18N_SHOW_MENU);
// Left Menu
get_i18n_navigation($parent, 1, 99, I18N_SHOW_NORMAL);
?>
More stuff about i18n navigation can be found on mvlcek's site.