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