Skip to end of metadata
Go to start of metadata

Before you modify a component, it is generally a good idea to duplicate it. This way, you can work on your copy while keeping the original component intact for further use and reference. This approach also enables you to work with many different versions of the same component. Here are the required steps - along with best practices - to duplicate a component.

  1. From the Sitecore Content Editor, create a new folder named Custom under /sitecore/Layout/Sublayouts.

  2. Duplicate the Coveo Search sublayout (right-click > Duplicate).
  3. Name it Custom Coveo Search.
  4. Move it to the Custom folder that you have just created.
  5. In your new sublayout (/sitecore/Layout/Sublayouts/Custom/Custom Coveo Search), change the value of the Ascx file field so that it points to /layouts/Custom/CustomCoveoSearch.ascx.

    Icon

    Note that CustomCoveoSearch.ascx does not exist yet. It will be created in the upcoming steps.

  6. On the Sitecore server, locate the physical folder located at <your sitecore instance folder>\Website\layouts.
  7. In it, create a new folder named Custom.
  8. Copy the file \Website\layouts\Coveo\CoveoSearch.ascx to \Website\layouts\Custom\CustomCoveoSearch.ascx.
  9. From the Sitecore Content Editor, create a new Coveo Search Page under /sitecore/Content/Home if you do not already have one (right-click > Insert > Coveo Search Page).
  10. Access the Layout Details dialog of your Coveo Search Page item (Presentation > Details).
  11. For the Default device, select Edit in the list of controls.
  12. In the Device Editor dialog, under Controls, select the Coveo Search control and choose Change.
  13. In the Select a Rendering dialog, select your duplicated sublayout (/Sublayouts/Custom/Custom Coveo Search) and choose Select.
  14. In the Device Editor dialog, choose OK.
  15. In the Layout Details dialog, choose OK.
  16. Save your Coveo Search Page item.
  17. Validate that your Coveo Search Page now displays your new Coveo Search sublayout/component (Publish > Preview).

    Icon

    Visually, unless you customize the Custom Coveo Search component, your Coveo Search Page will look exactly the same as before. It would be a good idea to display some custom string to validate that your new component is indeed displayed as expected. For example, you may add a simple HTML paragraph as such:

    The end result should look like this: