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.
legacy:vufind_1.x_developer_manual:building_a_recommendations_module

This is an old revision of the document!


Building a Recommendations Module

IMPORTANT: This new feature was introduced in VuFind 1.0. If you are using an earlier beta version, please upgrade to take advantage of it.

:!: This documentation refers to VuFind 1.x; for newer versions, see this page instead.

What is a recommendations module?

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. The recommendations module system allows custom code to be easily dropped in place so that you can display custom messages for any search type.

How does it work?

To create a recommendations module, follow these steps:

  • Look at the interface specification in web/sys/Recommend/Interface.php. You will need to build a class based on this interface. The existing modules in web/sys/Recommend provide examples of how this may be done.
  • Create templates to accompany your new class. These will be dynamically loaded into the search results screen. Some examples can be found in the Search/Recommend folder under each of VuFind's themes.
  • Once your module is built, you can turn it on by editing web/conf/searches.ini – see the comments above the [SideRecommendations] / [TopRecommendations] sections of the file for details.
legacy/vufind_1.x_developer_manual/building_a_recommendations_module.1450113420.txt.gz · Last modified: 2015/12/14 17:17 by demiankatz