/** * Get a paginated list of the shortlist items. * * @return mixed the paginated list of items, or false if the list cannot be found. * */ public function paginatedItems() { if (!$this->owner->getRequest()->param('URL') || !ShortList::isBrowser()) { return false; } $items = false; $list = DataObject::get_one('ShortList', $filter = array('URL' => $this->owner->getRequest()->param('URL'))); if ($list) { $items = $list->ShortListItems(); } $this->owner->list = new PaginatedList($items, $this->owner->getRequest()); $this->owner->list->setPageLength(Config::inst()->get('ShortList', 'PaginationCount')); $this->owner->list->setPaginationGetVar('page'); if ($this->owner->currentPage) { $this->owner->list->setCurrentPage($this->owner->currentPage); } return $this->owner->list; }