Project

General

Profile

1
//:Create a parent link to your page
2
//:Display a link to the parent page of the current page
3
$info = show_menu2(0, SM2_CURR, SM2_START, SM2_ALL|SM2_BUFFER, '[if(class==menu-current){[level] [sib] [sibCount] [parent]}]', '', '', '');
4
list($nLevel, $nSib, $nSibCount, $nParent) = explode(' ', $info);
5

    
6
// show up level
7
if ($nLevel > 0) {
8
$lev = $nLevel - 1;
9
return show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB|SM2_BUFFER, "[if(level==$lev){[a][menu_title]</a>}]", '', '', '');
10
}
11
else 
12
return '(no parent)';
13

    
(7-7/15)