Project

General

Profile

1
//:Create a next link to your page
2
//:Display a link to the next 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

    
6
// show next
7
$nxt = $nSib < $nSibCount ? $nSib + 1 : 0;
8
if ($nxt > 0) {
9
return show_menu2(0, SM2_CURR, SM2_START, SM2_ALL|SM2_BUFFER,	"[if(sib==$nxt){&gt;&gt; [a][menu_title]</a>}]", '', '', '');
10
}
11
else return '(no next)';
(5-5/15)