diff --git a/config/vufind/Collection.ini b/config/vufind/Collection.ini index b3c833917500d04e0ed252e3ba4cbc2754a85c5a..55338e814a2bc5646c840693782614d566ce99d8 100644 --- a/config/vufind/Collection.ini +++ b/config/vufind/Collection.ini @@ -1,6 +1,11 @@ ; This file controls the Collection module (the page accessed by viewing a record ; 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 ; module. [Sort] diff --git a/module/VuFind/src/VuFind/RecordTab/CollectionList.php b/module/VuFind/src/VuFind/RecordTab/CollectionList.php index 045ba180ba0dbb6b5bb5534795885d55fd13a078..41076b4a21a984edbae1edf6e67e716cae211c18 100644 --- a/module/VuFind/src/VuFind/RecordTab/CollectionList.php +++ b/module/VuFind/src/VuFind/RecordTab/CollectionList.php @@ -87,6 +87,7 @@ class CollectionList extends AbstractBase $this->results->getParams()->initFromRecordDriver( $this->getRecordDriver(), $params ); + $this->results->getParams()->recommendationsEnabled(true); $this->processed = true; } return $this->results; diff --git a/module/VuFind/src/VuFind/Search/SolrCollection/Params.php b/module/VuFind/src/VuFind/Search/SolrCollection/Params.php index ec6787958bed59d1d51a9b59880a84449b6a49cc..22b9972f22b4070ed18f1bd71b3002070dca16de 100644 --- a/module/VuFind/src/VuFind/Search/SolrCollection/Params.php +++ b/module/VuFind/src/VuFind/Search/SolrCollection/Params.php @@ -118,7 +118,10 @@ class Params extends \VuFind\Search\Solr\Params */ protected function getRecommendationSettings() { - // Disabled for now - return array(); + // Collection recommendations + $searchSettings = \VuFind\Config\Reader::getConfig('Collection'); + return isset($searchSettings->Recommend) + ? $searchSettings->Recommend->toArray() + : array(); } } \ No newline at end of file