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 Widgets Views and Shared Views


Follow these steps to add a new template for a specific widget:

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

For example: “ProductContentOverride.cshtml” or “_TermsAndConditionsInfoModalOverride.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\ProductContent.cshtml

SitefinityWebApp\ResourcesPackages\Bootstrap\MVC\Views\Shared\ TermsAndConditionsInfoModal.cshtml

Create override files in MVC folder:

SitefinityWebApp\Mvc\Views\scProductContent\ProductContentOverride.cshtml

SitefinityWebApp\Mvc\Views\Shared\TermsAndConditionsInfoModalOverride.cshtml

Recommendations: For multisite, the override views should be added in 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 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 for creating widget templates. For more information check https://docs.sitefinity.com/feather-priorities-for-resolving-views

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