====== Content Block Plugins ====== :!: This feature was introduced in VuFind 5.0. Content blocks are used to embed arbitrary content into templates (currently used primarily for filling in the home pages of various search modules). See the comments in the [HomePage] section of [[https://github.com/vufind-org/vufind/blob/dev/config/vufind/searches.ini|searches.ini]] for a list of blocks available in your version of VuFind. ===== Why Use It? ===== This makes it easy to configure the order and nature of the content displayed to users on search landing pages. You can disable unwanted features or plug in your own through configuration without having to edit core template files. ===== Key Plugin Details ===== **Default Namespace:** \VuFind\ContentBlock **Interface:** [[https://github.com/vufind-org/vufind/blob/dev/module/VuFind/src/VuFind/ContentBlock/ContentBlockInterface.php|\VuFind\ContentBlock\ContentBlockInterface]] **Service Locator Configuration Section in module.config.php:** ['vufind']['plugin_managers']['contentblock'] **Service Manager Name for Service Locator:** VuFind\ContentBlock\PluginManager **Template Name:** To display the content, VuFind will attempt to load a template from the ContentBlock folder of the current theme whose name corresponds with the class of the plugin (ignoring the namespace). The template will have access to the variables returned by the plugin's getContext() method. See the [[development:plugins:general_information|General Plugin Information]] page for more details on VuFind plugins. ===== Configuring Content Blocks ===== Home page content blocks are configured through the [HomePage] content setting in [[configuration:files:searches.ini]] for the standard Solr search/home page. Other search types may have recommendation settings in their own .ini files (for example, [[configuration:files:summon.ini|Summon.ini]] has its own [HomePage] section).