Feather: Modify default templates used in all dynamic content widgets
Feather enables you to change the appearance of dynamic content MVC widgets through their comprehensive set of properties. In some cases, you need to further customize the look of MVC built-in widgets. You may want to implement some custom logic on the template, for example, a dropdown menu.
Use the following procedure to customize the view of the dynamic content MVC widget:
- Open the feather-widgets repository in Sitefinity CMS GitHub and navigate to Telerik.Sitefinity.Frontend.DynamicContent » WidgetTemplates » ContainerTemplates.
- Depending on whether you want to customize the List or Detail views, copy one of the following files:
ListTemplateContainer.cshtml
DetailTemplateContainer.cshtml
- Open your project in Visual Studio.
- Under SitefinityWebApp, create a new folder and name it WidgetTemplates.
- Inside folder
WidgetTemplates
, create a new folder and name it ContainerTemplates.
- Inside folder
ContainerTemplates
, paste the view copied in Step 2.
- Open the file and edit it in the following way:
NOTE: The new template is available only for new dynamic content types.
- If you want to apply the template to existing dynamic content types, regenerate their widget templates.
To do this, perform the following:
- Click Administration » Module builder.
- Open the module and then open the dynamic content type.
- Click the Finish button and in the dialog box, select Update widget templates as well.