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

Added support for top recommendations in collection module.

parent 9eb6ff7c
No related merge requests found
; This file controls the Collection module (the page accessed by viewing a record ; This file controls the Collection module (the page accessed by viewing a record
; which is a collection). ; which is a collection).
; These settings control the top and side recommendations (see searches.ini for
; details on recommendation modules).
[Recommend]
;top[] = "PubDateVisAjax:true:publishDate"
; These settings control which fields are available to sort on in the Collection ; These settings control which fields are available to sort on in the Collection
; module. ; module.
[Sort] [Sort]
......
...@@ -87,6 +87,7 @@ class CollectionList extends AbstractBase ...@@ -87,6 +87,7 @@ class CollectionList extends AbstractBase
$this->results->getParams()->initFromRecordDriver( $this->results->getParams()->initFromRecordDriver(
$this->getRecordDriver(), $params $this->getRecordDriver(), $params
); );
$this->results->getParams()->recommendationsEnabled(true);
$this->processed = true; $this->processed = true;
} }
return $this->results; return $this->results;
......
...@@ -118,7 +118,10 @@ class Params extends \VuFind\Search\Solr\Params ...@@ -118,7 +118,10 @@ class Params extends \VuFind\Search\Solr\Params
*/ */
protected function getRecommendationSettings() protected function getRecommendationSettings()
{ {
// Disabled for now // Collection recommendations
return array(); $searchSettings = \VuFind\Config\Reader::getConfig('Collection');
return isset($searchSettings->Recommend)
? $searchSettings->Recommend->toArray()
: array();
} }
} }
\ No newline at end of file
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