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:
- Navigate
to Pages in Sitefinity Backend.
- Click
on the page that you want to edit.
- Add
the widget to your page and open it for editing (open the widget designer).
- 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
Read Next
This Section Also Contains
- ECommerce CMS MVC with Bootstrap 4
- Creating a New Sitefinity Custom Template
- How to Share Template in Multisite Instance
- How to Customize a Site with Resource Packages
- Theming Bootstrap
- How to Configure the Not Available Images for Configured Products
- Page Long Cache Considerations and Configuration
- Replace Not Available Images
- Mappings Module
- Personalization Integrated with JDEdwards
- How to Add New Widget Template
- How to Include Local Web Font
- How to Use External Plugins Locally
- Sitefinity Images
- Sitefinity Authentication Expiration
- Sitefinity Health Check Service Configuration and SmarterCommerce Health Checks
- Internal Plugins Configuration in Update 6
- Internal Plugins Configuration in Update 7
- How to Setup Pickup Instructions Page
- How to Setup Terms and Conditions Page
- Sitefinity Multisite Resource Override
- Content Search Configuration
- Product Assignments (Filter by Attribute)
- Google Analytics Configuration
- Configure Azure Redis Cache (ASP.Net State Server Provider)
- Task Manager Email Notifications
- Configure Google Maps
- Catalog and Product Content Metatags (SEO)
- Cookies Configuration
- Reset Password Configuration
- Recycle Bin
- Login Page Configuration
- Error Page Configuration
- Configure SmarterCommerce Menu Backend
- Sitefinity User Group
- Copy Settings and Mapping on Multisite
- New Site – Activate Modules
- Shared Products Module
- Configure Image Optimization
- Management Console Email Templates
- How to Enable Canonical URL
- EIPP Modules
- Sitefinity File Manager
- PunchOut Configuration
- Troubleshooting