From ec7a69856ea123be534598d363b9d2e3fa98974c Mon Sep 17 00:00:00 2001 From: Maccabee Levine <31278545+maccabeelevine@users.noreply.github.com> Date: Tue, 14 Nov 2023 16:33:37 -0500 Subject: [PATCH] Support filters and custom heading on recommendation modules (#3192) --- config/vufind/searches.ini | 54 +++++++++---- .../VuFind/Recommend/AbstractSearchObject.php | 63 ++++++++++++++- .../Recommend/AbstractSearchObjectFactory.php | 81 +++++++++++++++++++ .../src/VuFind/Recommend/CatalogResults.php | 10 +++ .../src/VuFind/Recommend/EDSResults.php | 10 +++ .../src/VuFind/Recommend/EPFResults.php | 10 +++ .../Recommend/InjectSearchRunnerFactory.php | 11 +-- .../VuFind/Recommend/LibGuidesAZResults.php | 10 +++ .../src/VuFind/Recommend/LibGuidesResults.php | 10 +++ .../src/VuFind/Recommend/PluginManager.php | 14 ++-- .../src/VuFind/Recommend/SummonResults.php | 10 +++ .../src/VuFind/Recommend/WebResults.php | 10 +++ .../Recommend/SummonResultsTest.php | 4 +- .../VuFindTest/Recommend/WebResultsTest.php | 4 +- .../templates/Recommend/CatalogResults.phtml | 3 +- .../templates/Recommend/EDSResults.phtml | 3 +- .../templates/Recommend/EPFResults.phtml | 3 +- .../Recommend/LibGuidesAZResults.phtml | 3 +- .../Recommend/LibGuidesResults.phtml | 3 +- .../templates/Recommend/SummonResults.phtml | 3 +- .../templates/Recommend/WebResults.phtml | 3 +- 21 files changed, 282 insertions(+), 40 deletions(-) create mode 100644 module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php diff --git a/config/vufind/searches.ini b/config/vufind/searches.ini index 3311b6dffe4..6a5a3fef701 100644 --- a/config/vufind/searches.ini +++ b/config/vufind/searches.ini @@ -258,10 +258,13 @@ WorkKeys = year ; ; Available modules recommended for use in the side area: ; -; CatalogResults:[GET parameter]:[result limit] +; CatalogResults:[GET parameter]:[result limit]:[custom heading]:[filter ini section] ; Display catalog search results matching the terms found in the specified ; GET parameter (default = "lookfor"), limited to a specified number of -; matches (default = 5). This is designed for use with non-catalog modules. +; matches (default = 5). This is designed for use with non-catalog modules. +; The optional custom heading overrides the default for this recommendation. +; Filters may be defined in the specified section of the searches.ini +; file; see [CatalogResultsVideoFilter] below for an example of this. ; Databases:[result limit]:[ini name] ; Displays a list of the databases referenced in EDS or similar facets, each ; linking to its individual website. The .ini file must contain a [Databases] @@ -269,17 +272,19 @@ WorkKeys = year ; DPLATerms:[collapsed] ; Display results from the DPLA catalog. Provide a boolean to have the sidebar ; collapsed or open on page load. -; EDSResults:[GET parameter]:[result limit] +; EDSResults:[GET parameter]:[result limit]:[custom heading] ; Display EDS search results matching the terms found in the specified ; GET parameter (default = "lookfor"), limited to a specified number of -; matches (default = 5). -; EDSResultsDeferred:[GET parameter]:[result limit] +; matches (default = 5). The optional custom heading overrides the default +; for this recommendation. +; EDSResultsDeferred:[GET parameter]:[result limit]:[custom heading] ; Same as EDSResults, but loaded via AJAX. -; EPFResults:[GET parameter]:[result limit] +; EPFResults:[GET parameter]:[result limit]:[custom heading] ; Display EPF (EBSCO Publication Finder) search results matching the terms ; found in the specified GET parameter (default = "lookfor"), limited to a -; specified number of matches (default = 5). -; EPFResultsDeferred:[GET parameter]:[result limit] +; specified number of matches (default = 5). The optional custom heading +; overrides the default for this recommendation. +; EPFResultsDeferred:[GET parameter]:[result limit]:[custom heading] ; Same as EPFResults, but loaded via AJAX. ; EuropeanaResults:[url]:[requestParam]:[limit]:[unwanted data providers] ; Display search results from Europeana.eu API. @@ -308,17 +313,19 @@ WorkKeys = year ; who owns a subject guide whose title most closely matches the search terms. ; Uses configuration in LibGuidesAPI.ini and requires configuration in ; contentsecuritypolicy.ini. -; LibGuidesResults:[GET parameter]:[result limit] +; LibGuidesResults:[GET parameter]:[result limit]:[custom heading] ; Display LibGuides research guides search results matching the terms found in ; the specified GET parameter (default = "lookfor"), limited to a specified -; number of matches (default = 5). -; LibGuidesResultsDeferred:[GET parameter]:[result limit] +; number of matches (default = 5). The optional custom heading overrides the +; default for this recommendation. +; LibGuidesResultsDeferred:[GET parameter]:[result limit]:[custom heading] ; Same as LibGuidesResults, but loaded via AJAX. -; LibGuidesAZResults:[GET parameter]:[result limit] +; LibGuidesAZResults:[GET parameter]:[result limit]:[custom heading] ; Display LibGuides A-Z Databases search results matching the terms found in ; the specified GET parameter (default = "lookfor"), limited to a specified -; number of matches (default = 5). -; LibGuidesAZResultsDeferred:[GET parameter]:[result limit] +; number of matches (default = 5). The optional custom heading overrides the +; default for this recommendation. +; LibGuidesAZResultsDeferred:[GET parameter]:[result limit]:[custom heading] ; Same as LibGuidesAZResults, but loaded via AJAX. ; OpenLibrarySubjects:[GET parameter]:[limit]:[date filter]:[Subject types] ; Display full-text, public scans from the Open Library (OL) Subjects API. @@ -390,11 +397,14 @@ WorkKeys = year ; specified when combining this module with a non-Summon-based search module. ; SummonDatabasesDeferred:[GET parameter] ; Same as SummonDatabases, but loaded via AJAX. -; SummonResults:[GET parameter]:[result limit] +; SummonResults:[GET parameter]:[result limit]:[custom heading]:[filter ini section] ; Display Summon search results matching the terms found in the specified ; GET parameter (default = "lookfor"), limited to a specified number of ; matches (default = 5). -; SummonResultsDeferred:[GET parameter]:[result limit] +; Filters may be defined in the specified section of the Summon.ini +; file; see [CatalogResultsVideoFilter] below for an example of this. The +; optional custom heading overrides the default for this recommendation module. +; SummonResultsDeferred:[GET parameter]:[result limit]:[custom heading]:[ini section] ; Same as SummonResults, but loaded via AJAX. ; SummonTopics:[GET parameter] ; Display Summon-generated topic recommendations matching the terms found @@ -402,10 +412,13 @@ WorkKeys = year ; Summon search, the [GET parameter] setting will be ignored and the actual ; current Summon search will be used instead. The parameter only needs to be ; specified when combining this module with a non-Summon-based search module. -; WebResults:[GET parameter]:[result limit] +; WebResults:[GET parameter]:[result limit]:[custom heading]:[filter ini section] ; Display website search results matching the terms found in the specified ; GET parameter (default = "lookfor"), limited to a specified number of ; matches (default = 5). This requires the website Solr core to be active. +; Filters may be defined in the specified section of the website.ini +; file; see [CatalogResultsVideoFilter] below for an example of this. The +; optional custom heading overrides the default for this recommendation module. ; ; Available modules recommended for use in the top area: ; @@ -869,3 +882,10 @@ maxLimit = 100 ; ttl, Time to Live, i.e. cache entry life time in seconds. 300 seconds by default. ;options[ttl] = 300 +; This example section provides filters for the CatalogResults recommendation +; module. The section name is specified in the recommendation module config. +;[CatalogResultsVideoFilter] + +; Filters are defined as in [RawHiddenFilters] in order to handle more complex +; filter combinations. +;0 = "format:Video" diff --git a/module/VuFind/src/VuFind/Recommend/AbstractSearchObject.php b/module/VuFind/src/VuFind/Recommend/AbstractSearchObject.php index bad5bccdbc5..50c775f842b 100644 --- a/module/VuFind/src/VuFind/Recommend/AbstractSearchObject.php +++ b/module/VuFind/src/VuFind/Recommend/AbstractSearchObject.php @@ -61,6 +61,20 @@ abstract class AbstractSearchObject implements RecommendInterface */ protected $limit; + /** + * Heading for this recommendation module + * + * @var string + */ + protected $heading; + + /** + * Config section with filters for this search + * + * @var string + */ + protected $filterIniSection; + /** * Name of request parameter to use for search query * @@ -75,14 +89,23 @@ abstract class AbstractSearchObject implements RecommendInterface */ protected $runner; + /** + * Config PluginManager + * + * @var \VuFind\Config\PluginManager + */ + protected $configManager; + /** * Constructor * - * @param SearchRunner $runner Search runner + * @param SearchRunner $runner Search runner + * @param \VuFind\Config\PluginManager $configManager Config manager */ - public function __construct(SearchRunner $runner) + public function __construct(SearchRunner $runner, \VuFind\Config\PluginManager $configManager) { $this->runner = $runner; + $this->configManager = $configManager; } /** @@ -99,6 +122,9 @@ public function setConfig($settings) $this->limit = (isset($settings[1]) && is_numeric($settings[1]) && $settings[1] > 0) ? intval($settings[1]) : 5; + + $this->heading = $settings[2] ?? $this->getDefaultHeading(); + $this->filterIniSection = $settings[3] ?? false; } /** @@ -139,6 +165,22 @@ public function init($params, $request) $lookfor, $params->getOptions()->getHandlerForLabel($typeLabel) ); + + // Set any filters configured for this search + if (!empty($this->filterIniSection)) { + $ini = $params->getOptions()->getSearchIni(); + $config = $this->configManager->get($ini); + try { + $filters = $config->{$this->filterIniSection}->toArray() ?? []; + } catch (\Error $e) { + throw new \Exception( + "No section found matching '$this->filterIniSection' in $ini.ini." + ); + } + foreach ($filters as $filter) { + $params->addFilter($filter); + } + } }; // Perform the search: @@ -170,10 +212,27 @@ public function getResults() return $this->results; } + /** + * Get the heading. + * + * @return string + */ + public function getHeading() + { + return $this->heading; + } + /** * Get the search class ID to use for building search objects. * * @return string */ abstract protected function getSearchClassId(); + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + abstract protected function getDefaultHeading(); } diff --git a/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php b/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php new file mode 100644 index 00000000000..a14383c430a --- /dev/null +++ b/module/VuFind/src/VuFind/Recommend/AbstractSearchObjectFactory.php @@ -0,0 +1,81 @@ + + * @author Maccabee Levine + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ + +namespace VuFind\Recommend; + +use Laminas\ServiceManager\Exception\ServiceNotCreatedException; +use Laminas\ServiceManager\Exception\ServiceNotFoundException; +use Psr\Container\ContainerExceptionInterface as ContainerException; +use Psr\Container\ContainerInterface; +use VuFind\Search\SearchRunner; + +/** + * Factory for instantiating recommendation modules. + * + * @category VuFind + * @package Recommendations + * @author Demian Katz + * @author Maccabee Levine + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + */ +class AbstractSearchObjectFactory implements \Laminas\ServiceManager\Factory\FactoryInterface +{ + /** + * Create an object + * + * @param ContainerInterface $container Service manager + * @param string $requestedName Service being created + * @param null|array $options Extra options (optional) + * + * @return object + * + * @throws ServiceNotFoundException if unable to resolve the service. + * @throws ServiceNotCreatedException if an exception is raised when + * creating a service. + * @throws ContainerException&\Throwable if any other error occurs + * + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function __invoke( + ContainerInterface $container, + $requestedName, + array $options = null + ) { + if (!empty($options)) { + throw new \Exception('Unexpected options passed to factory.'); + } + $module = new $requestedName( + $container->get(SearchRunner::class), + $container->get(\VuFind\Config\PluginManager::class) + ); + return $module; + } +} diff --git a/module/VuFind/src/VuFind/Recommend/CatalogResults.php b/module/VuFind/src/VuFind/Recommend/CatalogResults.php index 6eb4ebada10..924d106e647 100644 --- a/module/VuFind/src/VuFind/Recommend/CatalogResults.php +++ b/module/VuFind/src/VuFind/Recommend/CatalogResults.php @@ -52,4 +52,14 @@ protected function getSearchClassId() { return 'Solr'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'Catalog Results'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/EDSResults.php b/module/VuFind/src/VuFind/Recommend/EDSResults.php index 2658b4ce301..e7b2fc61f6c 100644 --- a/module/VuFind/src/VuFind/Recommend/EDSResults.php +++ b/module/VuFind/src/VuFind/Recommend/EDSResults.php @@ -51,4 +51,14 @@ protected function getSearchClassId() { return 'EDS'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'EDS Results'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/EPFResults.php b/module/VuFind/src/VuFind/Recommend/EPFResults.php index 311539473c2..3ed0f060844 100644 --- a/module/VuFind/src/VuFind/Recommend/EPFResults.php +++ b/module/VuFind/src/VuFind/Recommend/EPFResults.php @@ -53,4 +53,14 @@ protected function getSearchClassId() { return 'EPF'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'epf_recommendations'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php b/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php index daae7bba3c4..d46dbc383ff 100644 --- a/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php +++ b/module/VuFind/src/VuFind/Recommend/InjectSearchRunnerFactory.php @@ -38,11 +38,12 @@ /** * Factory for instantiating recommendation modules with search runner. * - * @category VuFind - * @package Recommendations - * @author Demian Katz - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License - * @link https://vufind.org/wiki/development Wiki + * @category VuFind + * @package Recommendations + * @author Demian Katz + * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License + * @link https://vufind.org/wiki/development Wiki + * @deprecated Use AbstractSearchObjectFactory */ class InjectSearchRunnerFactory implements \Laminas\ServiceManager\Factory\FactoryInterface { diff --git a/module/VuFind/src/VuFind/Recommend/LibGuidesAZResults.php b/module/VuFind/src/VuFind/Recommend/LibGuidesAZResults.php index 11f08d232bc..743522cb949 100644 --- a/module/VuFind/src/VuFind/Recommend/LibGuidesAZResults.php +++ b/module/VuFind/src/VuFind/Recommend/LibGuidesAZResults.php @@ -53,4 +53,14 @@ protected function getSearchClassId() { return 'LibGuidesAZ'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'libguidesaz_recommendations'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/LibGuidesResults.php b/module/VuFind/src/VuFind/Recommend/LibGuidesResults.php index 5b45a5fec25..72d4cd20d75 100644 --- a/module/VuFind/src/VuFind/Recommend/LibGuidesResults.php +++ b/module/VuFind/src/VuFind/Recommend/LibGuidesResults.php @@ -53,4 +53,14 @@ protected function getSearchClassId() { return 'LibGuides'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'libguides_recommendations'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/PluginManager.php b/module/VuFind/src/VuFind/Recommend/PluginManager.php index e10cc6899a2..2d29d504325 100644 --- a/module/VuFind/src/VuFind/Recommend/PluginManager.php +++ b/module/VuFind/src/VuFind/Recommend/PluginManager.php @@ -111,16 +111,16 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager AuthorFacets::class => InjectResultsManagerFactory::class, AuthorInfo::class => AuthorInfoFactory::class, AuthorityRecommend::class => InjectResultsManagerFactory::class, - CatalogResults::class => InjectSearchRunnerFactory::class, + CatalogResults::class => AbstractSearchObjectFactory::class, Channels::class => InvokableFactory::class, CollectionSideFacets::class => CollectionSideFacetsFactory::class, Databases::class => DatabasesFactory::class, Deprecated::class => InvokableFactory::class, DOI::class => InvokableFactory::class, DPLATerms::class => DPLATermsFactory::class, - EDSResults::class => InjectSearchRunnerFactory::class, + EDSResults::class => AbstractSearchObjectFactory::class, EDSResultsDeferred::class => InvokableFactory::class, - EPFResults::class => InjectSearchRunnerFactory::class, + EPFResults::class => AbstractSearchObjectFactory::class, EPFResultsDeferred::class => InvokableFactory::class, EuropeanaResults::class => EuropeanaResultsFactory::class, EuropeanaResultsDeferred::class => InvokableFactory::class, @@ -129,9 +129,9 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager FacetCloud::class => ExpandFacetsFactory::class, FavoriteFacets::class => FavoriteFacetsFactory::class, LibGuidesProfile::class => LibGuidesProfileFactory::class, - LibGuidesResults::class => InjectSearchRunnerFactory::class, + LibGuidesResults::class => AbstractSearchObjectFactory::class, LibGuidesResultsDeferred::class => InvokableFactory::class, - LibGuidesAZResults::class => InjectSearchRunnerFactory::class, + LibGuidesAZResults::class => AbstractSearchObjectFactory::class, LibGuidesAZResultsDeferred::class => InvokableFactory::class, Libraryh3lp::class => InvokableFactory::class, MapSelection::class => MapSelectionFactory::class, @@ -148,14 +148,14 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager SummonBestBetsDeferred::class => InvokableFactory::class, SummonDatabases::class => InjectResultsManagerFactory::class, SummonDatabasesDeferred::class => InvokableFactory::class, - SummonResults::class => InjectSearchRunnerFactory::class, + SummonResults::class => AbstractSearchObjectFactory::class, SummonResultsDeferred::class => InvokableFactory::class, SummonTopics::class => InjectResultsManagerFactory::class, SwitchQuery::class => SwitchQueryFactory::class, SwitchType::class => InvokableFactory::class, TopFacets::class => InjectConfigManagerFactory::class, VisualFacets::class => InjectConfigManagerFactory::class, - WebResults::class => InjectSearchRunnerFactory::class, + WebResults::class => AbstractSearchObjectFactory::class, ]; /** diff --git a/module/VuFind/src/VuFind/Recommend/SummonResults.php b/module/VuFind/src/VuFind/Recommend/SummonResults.php index 8e010bf0f36..37cb6524ea5 100644 --- a/module/VuFind/src/VuFind/Recommend/SummonResults.php +++ b/module/VuFind/src/VuFind/Recommend/SummonResults.php @@ -51,4 +51,14 @@ protected function getSearchClassId() { return 'Summon'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'Summon Results'; + } } diff --git a/module/VuFind/src/VuFind/Recommend/WebResults.php b/module/VuFind/src/VuFind/Recommend/WebResults.php index 85f7968698c..fecb3f9385c 100644 --- a/module/VuFind/src/VuFind/Recommend/WebResults.php +++ b/module/VuFind/src/VuFind/Recommend/WebResults.php @@ -52,4 +52,14 @@ protected function getSearchClassId() { return 'SolrWeb'; } + + /** + * Get the default heading for this recommendation module. + * + * @return string + */ + protected function getDefaultHeading() + { + return 'Library Web Search'; + } } diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SummonResultsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SummonResultsTest.php index e93b37d3cb0..ab9ed6d21d0 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SummonResultsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/SummonResultsTest.php @@ -55,7 +55,9 @@ public function testGetSearchClassId(): void $runner = $this->getMockBuilder(\VuFind\Search\SearchRunner::class) ->disableOriginalConstructor() ->getMock(); - $obj = new SummonResults($runner); + $configManager = $this->getMockBuilder(\VuFind\Config\PluginManager::class) + ->getMock(); + $obj = new SummonResults($runner, $configManager); $this->assertSame('Summon', $method->invoke($obj)); } } diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/WebResultsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/WebResultsTest.php index cc296050fdb..7ae14b0b082 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/WebResultsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Recommend/WebResultsTest.php @@ -55,7 +55,9 @@ public function testGetSearchClassId(): void $runner = $this->getMockBuilder(\VuFind\Search\SearchRunner::class) ->disableOriginalConstructor() ->getMock(); - $obj = new WebResults($runner); + $configManager = $this->getMockBuilder(\VuFind\Config\PluginManager::class) + ->getMock(); + $obj = new WebResults($runner, $configManager); $this->assertSame('SolrWeb', $method->invoke($obj)); } diff --git a/themes/bootstrap3/templates/Recommend/CatalogResults.phtml b/themes/bootstrap3/templates/Recommend/CatalogResults.phtml index df96f4435d1..3a9cfd3d5a8 100644 --- a/themes/bootstrap3/templates/Recommend/CatalogResults.phtml +++ b/themes/bootstrap3/templates/Recommend/CatalogResults.phtml @@ -1,9 +1,10 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?> -

transEsc('Catalog Results')?>

+

transEsc($heading)?>

  • diff --git a/themes/bootstrap3/templates/Recommend/EDSResults.phtml b/themes/bootstrap3/templates/Recommend/EDSResults.phtml index 71719b12168..3f5db49efab 100644 --- a/themes/bootstrap3/templates/Recommend/EDSResults.phtml +++ b/themes/bootstrap3/templates/Recommend/EDSResults.phtml @@ -1,9 +1,10 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?> -

    transEsc('EDS Results')?>

    +

    transEsc($heading)?>

    diff --git a/themes/bootstrap3/templates/Recommend/EPFResults.phtml b/themes/bootstrap3/templates/Recommend/EPFResults.phtml index 174e2036780..e2877550dab 100644 --- a/themes/bootstrap3/templates/Recommend/EPFResults.phtml +++ b/themes/bootstrap3/templates/Recommend/EPFResults.phtml @@ -1,9 +1,10 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?> -

    transEsc('epf_recommendations')?>

    +

    transEsc($heading)?>

    diff --git a/themes/bootstrap3/templates/Recommend/LibGuidesAZResults.phtml b/themes/bootstrap3/templates/Recommend/LibGuidesAZResults.phtml index 7ef1d7a960b..66decf5dfe1 100644 --- a/themes/bootstrap3/templates/Recommend/LibGuidesAZResults.phtml +++ b/themes/bootstrap3/templates/Recommend/LibGuidesAZResults.phtml @@ -1,9 +1,10 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?> -

    transEsc('libguidesaz_recommendations')?>

    +

    transEsc($heading)?>

    diff --git a/themes/bootstrap3/templates/Recommend/LibGuidesResults.phtml b/themes/bootstrap3/templates/Recommend/LibGuidesResults.phtml index 097f8b565ce..054e1b66fdf 100644 --- a/themes/bootstrap3/templates/Recommend/LibGuidesResults.phtml +++ b/themes/bootstrap3/templates/Recommend/LibGuidesResults.phtml @@ -1,9 +1,10 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?> -

    transEsc('libguides_recommendations')?>

    +

    transEsc($heading)?>

    diff --git a/themes/bootstrap3/templates/Recommend/SummonResults.phtml b/themes/bootstrap3/templates/Recommend/SummonResults.phtml index 17bf953f18b..53eaec8e27d 100644 --- a/themes/bootstrap3/templates/Recommend/SummonResults.phtml +++ b/themes/bootstrap3/templates/Recommend/SummonResults.phtml @@ -1,7 +1,8 @@ recommend->getResults(); ?> getResults(); ?> +recommend->getHeading(); ?> -

    transEsc('Summon Results')?>

    +

    transEsc($heading)?>

    diff --git a/themes/bootstrap3/templates/Recommend/WebResults.phtml b/themes/bootstrap3/templates/Recommend/WebResults.phtml index a6f76337d97..4b7acdbb229 100644 --- a/themes/bootstrap3/templates/Recommend/WebResults.phtml +++ b/themes/bootstrap3/templates/Recommend/WebResults.phtml @@ -1,10 +1,11 @@ recommend->getResults(); $results = $searchObject->getResults(); + $heading = $this->recommend->getHeading(); ?>
    -

    transEsc('Library Web Search')?>

    +

    transEsc($heading)?>