Forum

Thread tagged as: Question

Reordering Content Next/Back

My website has a list detail solution and on the detail pages I have next and back buttons. I'd like to switch the order of those projects around which works fine except when using the next and back buttons. I'm pretty sure it's because the code for those buttons is filtering by id and the id is generated when each project is created.

The code at present is…


$opts = array( 'page' => '/index.php', 'filter'=>'_id', 'match'=>'gt', 'value'=>$id, 'count'=>1, 'sort'=>'_order', 'sort-order'=>'ASC', 'template'=>'_next.html' ); perch_content_custom('Projects', $opts);

Is there something better to filter by that won't retain the created order (assuming that is what's happening)

David Ellis

David Ellis 1 points

  • 6 years ago

Sorted this one with the solution from here…

https://solutions.grabaperch.com/architecture/how-do-i-link-prev-next