Skip to content
Snippets Groups Projects
Commit e178e0d8 authored by Demian Katz's avatar Demian Katz
Browse files

Added limit settings to Primo.

parent a6d9016f
No related merge requests found
...@@ -18,6 +18,15 @@ timeout = 30 ...@@ -18,6 +18,15 @@ timeout = 30
; Your API id ; Your API id
apiId = my-id apiId = my-id
; This section controls the result limit options for search results. default_limit
; sets the default number of results per page. limit_options is a comma-separated
; list of numbers to be presented to the end-user. If only one limit is required,
; set default_limit and leave limit_options commented out.
; WARNING: using large limits may require you to raise your PHP memory limits to
; avoid errors.
default_limit = 20
;limit_options = 10,20,40,60,80,100
; These are the default recommendations modules to use when no specific setting ; These are the default recommendations modules to use when no specific setting
; are found in the [TopRecommendations] or [SideRecommendations] sections below. ; are found in the [TopRecommendations] or [SideRecommendations] sections below.
; See the comments above those sections for details on legal settings. You may ; See the comments above those sections for details on legal settings. You may
......
...@@ -79,6 +79,15 @@ class Options extends \VuFind\Search\Base\Options ...@@ -79,6 +79,15 @@ class Options extends \VuFind\Search\Base\Options
// Load the search configuration file: // Load the search configuration file:
$searchSettings = $configLoader->get($this->searchIni); $searchSettings = $configLoader->get($this->searchIni);
// Set up limit preferences
if (isset($searchSettings->General->default_limit)) {
$this->defaultLimit = $searchSettings->General->default_limit;
}
if (isset($searchSettings->General->limit_options)) {
$this->limitOptions
= explode(",", $searchSettings->General->limit_options);
}
// Load search preferences: // Load search preferences:
if (isset($searchSettings->General->retain_filters_by_default)) { if (isset($searchSettings->General->retain_filters_by_default)) {
$this->retainFiltersByDefault $this->retainFiltersByDefault
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment