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 is a new feature that was introduced after the release of VuFind 1.0RC2. In order to take advantage of it, you will need to download a version of the trunk code at r2033 or later.

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 both the classic and default 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.1265226533.txt.gz · Last modified: 2014/06/13 13:12 (external edit)