Display child pages
If you want to always display all the child pages of page main1, this is easily done with
<ul><?php get_i18n_navigation('main1',1,9); ?></ul>
But if you also want to mark the menu item, if one of these child pages is selected, and display the child page's children in the menu, it is slightly complexer:
<ul> <?php $bc = return_i18n_breadcrumbs(return_page_slug()); get_i18n_navigation($bc[0]['url']=='main1'?return_page_slug():'main1',1,9); ?> </ul>
To display all child pages of the current top menu as title, but do so only if there are child pages, use the following code:
<?php $bc = return_i18n_breadcrumbs(return_page_slug()); $slug = $bc[0]['url']; $pages = return_i18n_pages(); if (@$pages[$slug]['children']) { echo '<h3>'.$bc[0]['menu'].'</h3>'; echo '<ul class="sidemenu">'; get_i18n_navigation(return_page_slug(),1,99); echo '</ul>'; } ?>
If you want to show only one level, use 1 as 3rd parameter to get_i18n_navigation.
You could show the title instead of the menu text by using $bc[0]['title'].