Sitefinity CMS MVC widgets use fields to build their views both for list and detail mode. Depending on your requirements, you can customize these fields by changing the view of a specific field either in a single dynamic content MVC widget or in all dynamic content MVC widgets. In addition to changing the view of a field, you may want to add additional logic to the field. In this case, we recommend to to create custom fields. The following article explains how to create custom field that inherits the LongTextAreaField and register it using dependency injection.
LongTextAreaField
Perform the following:
Templates
CustomLongTextField.cs
The code above registers new template for the custom field by overriding the GetTemplatePath method.
GetTemplatePath
Global.asax
Bootstrapper.Bootstrapped
ObjectFactory
The ObjectFactory is a special class in Sitefinity CMS that wraps the IUnityContainer, part of the Microsoft Practices Unity Application Block. You use the Unity Application Block for inversion of control pattern.
IUnityContainer
Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.
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.
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.
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.
To submit feedback, please update your cookie settings and allow the usage of Functional cookies.
Your feedback about this content is important