I just found this topic, and got trouble. The code in previous post does not work with ss 3.5x (Latest Stable Version)
In Portfolio.php must change the code to
public function PreviousPage() {
return Portfolio::get()->filter('ID:LessThan',$this->ID)->sort(array('ID' => 'DESC'))->first();
}
public function NextPage() {
return Portfolio::get()->filter('ID:GreaterThan',$this->ID)->sort(array('ID' => 'ASC'))->first();
}
This works for me, and hope this will help someone who get this trouble.