Table of Contents
Recommendation Module Plugins
Recommendation modules are used to display recommendations on the search results view based on the current query.
Why Use It?
Sometimes it is useful to make suggestions to a user based on their search terms. Depending on the type of search performed, the best recommendations may vary. For example, you may wish to suggest popular author names based on an author search, or common subject headings based on a subject search.
Key Plugin Details
Default Namespace: \VuFind\Recommend
Service Locator Configuration Section in module.config.php: ['vufind']['plugin_managers']['recommend']
Service Manager Name for Service Locator: VuFind\RecommendPluginManager (VuFind 2.x-4.x), VuFind\Recommend\PluginManager (VuFind 5.0+)
Template Name: To display the related record recommendations, VuFind will attempt to load a template from the Recommend folder of the current theme whose name corresponds with the class of the plugin (ignoring the namespace). The template will have access to the plugin object as $this→recommend.
See the General Plugin Information page for more details on VuFind plugins.
Recommendations may be associated with the top or sidebar region of the search results. They may be associated with specific search handlers or set as defaults for all non-customized handlers. They may also be set up to be displayed only when empty result sets are returned.
See the Code Generators Part 1 video for a hands-on example of building a custom Recommendation module.