---
title: "Override the default Rendering View Provider"
slug: "override-the-default-rendering-view-provider"
abstract: "You can override the path to the /Views folder using the Rendering View Provider."
---
# Override the default Rendering View Provider

Each view (`.cshtml` file) stores the HTML for rendering on the storefront. Do not modify the `.cshtml` files because they are overwritten when software updates are installed. Instead, define an alternative location for customized views in the **CustomRenderingViewPath** setting for a site.

Using the [Rendering View Provider](https://doc.sitecore.com/xp/en/developers/sxa/102/sitecore-experience-accelerator/customize-rendering-html-per-site.html), you can override views on a site-by-site basis. This provider is part of the XC Storefront Foundation assembly and uses IoC. The default behavior is to allow for the use of a different root folder other than ~/Views.

![ViewProviderConfigpath.png](https://doc.sitecore.com/api/markdown-image/xp/en/developers/102/sitecore-experience-commerce/images/ViewProviderConfigpath.png)

When you specify the path in the **CustomRenderingViewPath** field, the custom rendering view folder is checked first to determine if the file is present. If it is not present, the default ~/Views version of the view is used.

> [!important]
> The structure of the custom folder must be the same as that within the `~/Views` folder for Storefront‑related components.  For example, if `/Views/Commerce/Catalog/ProductPrice.cshtml` is to be overridden, it must be placed in the following path of the custom views folder: `/<CustomViews>/Views/Commerce/Catalog/ProductPrice.cshtml`.
>
> The custom views folder, on disk, must contain a copy of the `web.config` file found within the *~/Views* folder.

<details>
<summary><h2>Configuration</h2></summary>

The Rendering View Provider is registered in the` Sitecore.Commerce.XA.Foundation.Common.config` configuration file.

```xml
<sitecore>
     <services>
       <register serviceType="Sitecore.Commerce.XA.Foundation.Common.Providers.IRenderingViewProvider,
 Sitecore.Commerce.XA.Foundation.Common"
 implementationType="Sitecore.Commerce.XA.Foundation.Common.Providers.RenderingViewProvider,
 Sitecore.Commerce.XA.Foundation.Common" lifetime="Singleton"/>
     </services>
 </sitecore>

```

You can implement the `IRenderingViewProvider` interface and replace the current implementation by adjusting the configuration file accordingly.

</details>