Knowledge Base

Welcome to the SmarterCommerce documentation portal

What can we help you find?

SMARTERCOMMERCE

Search and Learn about Unified Commerce and Our SmarterCommerce Solutions
Digital Commerce Additional Manual

Override Template Partial Views


In some cases, the widgets have a partial view in HTML. For example, the Product Content has _ProductHeader.cshtml partial view.

To override these cases of views, follow the next steps:

 

1. Create a template file named “_PartialNameMyTemplateName” with extension .cshtml.

For example: “ProductHeaderOverride.cshtml”.

 

Place it in the following location: SitefinityWebApp\Mvc\Views\. You need to create the structure of the widget folder of the Resources Package.

Structure of the Resources package:

 

SitefinityWebApp\ResourcesPackages\Bootstrap\MVC\Views\scProductContent\_ProductHeader.cshtml

 

Create override files in MVC folder:

 

SitefinityWebApp\Mvc\Views\scProductContent\_ ProductHeader.cshtml

 

2. Create a template to View that contained the Partial view. Follow the first step in the “Override template widgets views and shared views

For example: SitefinityWebApp\Mvc\Views\scProductContent\ProductContentOverride.cshtml

 

 

 

3. Into this override view, the partial view must be modified in HTML:

 

4. The widget template that you have created will be automatically displayed inside the property editor of the widget designer and you can choose it as your base template.

 

This Section Also Contains

Bring It All Together

We bring together digital commerce, retail and call center channels with a united approach that leverages the power of onmi-channel while prioritizing JD Edwards connectivity.

CONNECT WITH AN EXPERT