About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools

Warning: This page has not been updated in over over a year and may be outdated or deprecated.

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

Interface: \VuFind\Recommend\RecommendInterface

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.

Configuring Recommendations

Recommendation modules are activated through searches.ini for standard Solr searches. Other search types may have recommendation settings in their own .ini files (for example, Summon.ini).

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.

development/plugins/recommendation_modules.txt · Last modified: 2023/11/27 18:50 by demiankatz