imageblock with pagelink next page in sitemap

Permalink
i am using an image block with page url. is there a way to link to the next page in the sitemap?

i can only link manually to that page. but if i rearrange the pages it messes up the sequence of the pages.
i tried with next&previous block, but that gives me arrows below the image block.

thanks for hints or if that's possible at all.

bcron
 
mesign replied on at Permalink Reply
Maybe you can hardcode it in your template. This is some old code (don't know if it will still work).

<?php
//initialize the block
$next_prev = BlockType::getByHandle('next_previous');
//set your options
$next_prev->controller->orderBy = 'display_asc';
$next_prev->controller->loopSequence = true;
$next_prev->controller->excludeSystemPages = true;
//get the pages
$prev_page = $next_prev->controller->getPreviousCollection();
$next_page = $next_prev->controller->getNextCollection();
//get url's to the pages
$nh = Loader::helper('navigation');
$prev_url = $nh->getLinkToCollection($prev_page);
$next_url = $nh->getLinkToCollection($next_page);
?>

http://concrete5tricks.com/blog/hardcode-previous-and-next-page-lin...