Sorry, this page is only available in one language

NextPage2

Suggested dropletname: NextPage

Published by: Dev4me

The NextPage2 Droplet will create a link to the next page.
(works over all menu levels)

$page_id = PAGE_ID;
$r = " ";
if ($page_id !== 0) {
        ob_start();     
        show_menu2(0,SM2_ROOT,SM2_ALL,SM2_ALL,',[url]','','','','','');
        $allpages = explode(',', ob_get_contents());
        ob_end_clean();
        ob_start(); 
        show_menu2(0,SM2_ROOT,SM2_ALL,SM2_ALL,',[page_id]','','','','','');
        $allpageids = explode(',', ob_get_contents());
        ob_end_clean();
        $pos = array_search($page_id, $allpageids);
        if ($pos < count($allpageids) - 1) { 
                $next = $allpages[$pos + 1]; 
        } else {
                $next = $allpages[1]; 
        }
        $r = '<a title="Go to the next page" href="'.$next.'">>></a>';
}
return $r;

The difference with the original NextPage Droplet is that this one will create a link to the next page on all levels.

You can use this to let the viewer browse through all (visible) pages on your site.



« Previous droplet | Overview | Next droplet »