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

How to Add New Widget Template


Follow these steps to add new template for specific widget:

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

For example: “ProductContentOverride.cshtml” or “TermsAndConditionsInfoOverride.cshtml”

2. Place it on the following location: SitefinityWebApp\Mvc\Views\[scWidgetNameMyTemplateName].

For example: “MVC\Views\scProductContent\ProductContentOverride.cshtml” or “MVC\Views\Shared\_TermsAndConditionsInfoOverride.cshtml”

You need to create the structure of widget folder, example:

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

Create override files in MVC folder:

SitefinityWebApp\Mvc\Views\scProductContent\ProductContentOverride.cshtml

Recommendations: When customer is multisite, the override views should be add the name of site. For example:

SitefinityWebApp\Mvc\Views\scProductContent\CustomizationSite1.cshtml

The new template that you have created will be automatically displayed inside the property editor of the widget designer and you can choose it in order to base your template, following the steps:

1. Navigate to Pages in Sitefinity Backend.

2. Click on the page that you want to edit.

3. Add the widget to your page and open it for editing (open the widget designer).

4. Each widget has a dropdown box (Template Name) where you can select the template that applies to the widget. 

5. Click Save and Publish the page.

 There are other approaches to create widget templates. For more information check https://docs.sitefinity.com/feather-priorities-for-resolving-views

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