2015-03-30, 08:29:34
If you simply want to have the parent (ie landing) pages not pointing to a link, I did a custom function a while ago for a client; might work for you, eventually with some tweaking:
Launch like so:
The $loop variable is for the levels of nesting you want to make parent pages 'linkless'.
I also wrote some more comprehensive doc. on i18n nav: http://codepen.io/Webketje/full/VYbxmy/
Code:
function i18nMenuNoLandingPages($links, $loop = 0) {
$y = count($links);
static $str = '';
$str = $str . '<ul>';
for ($x = 0; $x < $y ; $x++) {
$item = $links[$x];
$str = $str . '<li>';
if ($item['haschildren']) {
$str = $str . '<a>' . $item['title'] . '</a>';
$str = i18nMenuNoLandingPages($item['children'], $loop++, $str);
} else if ($item['haschildren'] === false) {
$str = $str . '<a href="' . $item['url'] . '">' . $item['title'] . '</a>';
}
$str = $str . '</li>';
}
$str = $str . '</ul>';
return $str;
}
Launch like so:
Code:
$nav = return_i18n_menu_data(return_page_slug(),0,5,I18N_SHOW_NORMAL);
i18nMenuNoLandingPages($nav);
The $loop variable is for the levels of nesting you want to make parent pages 'linkless'.
I also wrote some more comprehensive doc. on i18n nav: http://codepen.io/Webketje/full/VYbxmy/