2011-08-29, 01:59:51
[/root.] Wrote:I'm trying to display the menu using default code/behavior i.e
Code:<?php get_i18n_navigation(return_page_slug(),1,99) ?>
menu items are starting from level 1 because my parent page (0) being used as a header. the code works well when browse the level 1 page but on the index page I don't see anything.
Normally I need to use this code to show sub pages of a parent page called page-slug
Code:<?php get_i18n_navigation('page-slug',1,100,I18N_SHOW_MENU); ?>
and this code works well but in this case I lose the required behavior i.e displaying child pages of a current opened page.
What should I change in the code to make the menu visible on the main page?
If you want to always show the children of main page 'page-slug', use the following code:
Code:
<?php
$bc = return_i18n_breadcrumbs(return_page_slug());
get_i18n_navigation($bc[0]['url']=='page-slug'?return_page_slug():'page-slug',1,99);
?>