--- title: Override Coveo Hive initialization options slug: '2401' canonical_url: https://docs.coveo.com/en/2401/ collection: coveo-for-sitecore-v5 source_format: adoc --- # Override Coveo Hive initialization options > **Legacy feature** > > The Coveo Hive Framework is now in maintenance mode and is no longer recommended for new implementations. > > To build new search experiences, use one of Coveo's more modern, lightweight, and responsive libraries. > To get started, see the [Build search](https://docs.coveo.com/en/2473/) article. Coveo Hive components and their underlying Coveo JavaScript Search Framework components have many available options. These options are often configurable in Sitecore on the data source items associated to the UI components. However, you might want to add an option which is available in the Coveo JavaScript Search Framework, but not yet in Coveo Hive. You might also want to add the option programmatically based on certain conditions. ## Creating a custom component Overriding the initialization options requires adding custom code to an existing component. You should duplicate an existing component instead of adding code to an out of the box component. The out of the box components are overwritten when upgrading, complicating your upgrade process. To create a new component . From the file system, copy the .cshtml file of an existing Coveo Hive view rendering from `/Views/Coveo Hive` to another folder. . From the Sitecore **Content Editor**, duplicate the view rendering item from `/Layouts/Renderings/Coveo Hive` to another folder. . From the Sitecore **Content Editor**, select the view rendering item and set its `Path` field value to the path of the .cshtml file created in step 1. Once the custom component is created, you can add it to the search interface by using a placeholder section or extending an existing placeholder, see [Insert custom components in an existing search interface](https://docs.coveo.com/en/2340/). ## Overriding the initialization options [.version.c4sc.c4sc-new.5-0-239-2.February-26&-2019] [Coveo for Sitecore 5.0.239.2](https://docs.coveo.com/en/2764#release-notes) In the .cshtml file of your component, add the following script after the HTML element of the component: ```javascript ``` Save the file. You should see the new attribute among the rest of the options when inspecting your page: ```html
``` This script will run before the initialization of the component since the Coveo `init` happens during the `DOMContentLoaded` event (see [Events](https://docs.coveo.com/en/417/)). For a hands-on advanced tutorial on this subject, see [Create a custom Coveo Hive component - Multi-sort tutorial](https://docs.coveo.com/en/2240/).