Modify field template of all dynamic content item widgets

Use this article, if you want to change the way a particular field is displayed in all dynamic content MVC widgets. 

  1. Go to Sitefinity CMS GitHub repository repository and navigate to folder Telerik.Sitefinity.Frontend.DynamicContent\WidgetTemplates\Fields\Templates.
  2. Copy the content of the DateField.cshtml template.
  3. Open your project in Visual Studio and under SitefinityWebApp, create new folder named WidgetTemplates
  4. Inside folder WidgetTemplates, create a new folder and name it Fields.
  5. Inside folder Fields, create a new folder and name it Templates.
  6. Inside folder Templates, create a new .cshtml file and name it DateField.cshtml.
  7. Inside the file, to change the format of the DateTime field, enter the following:
  8. Build the solution.
  9. Regenerate the widget templates of the MVC dynamic content widgets, where you want to use the new format.
    You can do this by changing the dynamic content meta type.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Tags

Was this article helpful?