Closed gibsonjc closed 5 years ago
This needs research. Is there a setting somewhere already defined that we can turn on? If not, could this be a bad idea for performance reasons and that's why they limited it to 20?
In TEST
Yes, this is configurable:
https://github.com/CARLI/vufind/blob/carli-release-4.1/config/vufind/searches.ini#L27
; 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
In TEST, I've un-commented-out limit_option, so now there is a choice among 10,20,40,60,80, and 100 (default 20).
These same configuration options are available for Reserves searches, too, but it's not documented. However, after using the same settings for Reserves, I noticed that only the 'default_limit' value was honored. In order to offer the user the ability to select available limit options, I had to edit the template to render the control. I've done this, too, in TEST:
diff --git a/themes/carli/templates/search/reservessearch.phtml b/themes/carli/templates/search/reservessearch.phtml
index b55aeab..efd97cc 100644
--- a/themes/carli/templates/search/reservessearch.phtml
+++ b/themes/carli/templates/search/reservessearch.phtml
@@ -43,6 +43,7 @@
<? if ($recordTotal > 0): ?>
<div class="pull-right flip">
+<?=$this->render('search/controls/limit.phtml')?> <?=$this->render('search/controls/sort.phtml')?>
=$this->transEsc('nohit_parse_error')?>
<? endif; ?>
<? else: ?> +
=$this->transEsc('Department')?> |
---|
KNX - It would be nice to have a toggle to change the number of results displayed on a page. I suppose the number "20" is fixed for all results pages, including reserves.