Override the default designer buttons

All widget designer views have the same footer of the designer window, where the Save and Cancel buttons are located. In this article, you learn how to put your own markup instead of the default dialog footer.

NOTE: When you override the buttons in one view, the footer uses the new markup until another view overrides it. The default markup is not restored when switching views.

The widget designer's module defines a directive, called section. Since the designer module is always loaded, this directive is also always present in your designer views.

To replace the default footer, add an attribute section="modal-footer" to the widget template's markup. As a result, the directive compiles the modified template and replaces the default footer. Use the following code:

The modified template is compiled in the context of the $scope of the current view's controller. The cancel()and save() functions are defined in the dialog controller's scope, which is the parent of the view's scope. Thus, you have the functions available in the view.

Additional resources

External links

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?