I am converting a phpwcms site from 1.0.4 to 1.3.
One problem is the 'Back' links in my Sub Menus have stopped working.
I traced the source to this tag in a template:
Code: Select all
{NAV_LIST_CURRENT:1:Back:mainSubMenuCur}
Thanks,
-Ken
Code: Select all
{NAV_LIST_CURRENT:1:Back:mainSubMenuCur}
Code: Select all
if($parent_level) {
if(!$struct[$level]["acat_redirect"]) {
$link = 'index.php?';
if($struct[$level]["acat_alias"]) {
$link .= html_specialchars($struct[$level]["acat_alias"]);
} else {
$link .= 'id='.$level.',0,0,1,0,0';
}
$redirect['target'] = '';
} else {
$redirect = get_redirect_link($struct[$level]["acat_redirect"], ' ', '');
$link = $redirect['link'];
}
Code: Select all
switch ($parent_level) {
case 0:
// back (originally meant 'don't show')
$show_parent_level = true;
// stolen from get_index_link_up()
$cat_id = $GLOBALS['content']['cat_id'];
$link = 'index.php?id=' . $GLOBALS['content']['struct'][$cat_id]['acat_struct'].',0,0,1,0,0';
$redirect['target'] = '';
break;
case 1:
// normal
$show_parent_level = true;
if(!$struct[$level]["acat_redirect"]) {
$link = 'index.php?';
if($struct[$level]["acat_alias"]) {
$link .= html_specialchars($struct[$level]["acat_alias"]);
} else {
$link .= 'id='.$level.',0,0,1,0,0';
}
$redirect['target'] = '';
} else {
$redirect = get_redirect_link($struct[$level]["acat_redirect"], ' ', '');
$link = $redirect['link'];
}
break;
default:
// don't show
$show_parent_level = false;
}
// this line replaces 'if($parent_level) {', above
if ($show_parent_level) {
Code: Select all
{NAV_LIST_CURRENT:0:Back:mainSubMenuCur}