Project

General

Profile

1
//:Create a previous link to your page
2
//:Display a link to the previous page on the same menu level
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 previous
6
$prv = $nSib > 1 ? $nSib - 1 : 0;
7
if ($prv > 0) {
8
return show_menu2(0, SM2_CURR, SM2_START, SM2_ALL|SM2_BUFFER, "[if(sib==$prv){[a][menu_title]</a> <<}]", '', '', '');
9
}
10
else
11
return '(no previous)';
(8-8/17)