How to add browse and edit functionality to custom controls and modules

How to add browse and edit functionality to custom controls and modules

September 29, 2011 0 Comments

The content you're reading is getting on in years
This post is on the older side and its content may be out of date.
Be sure to visit our blogs homepage for our latest news, updates and information.

If you want to allow your editors to edit some already published content without having them go to Sitefinity backend and edit widget or content item you can use Sitefinity built in Browse and Edit functionality.

browse and edit 

 Here I will describe how to implement it in your custom widgets or modules.

To use this functionality you need to implement IBrowseAndEditable interface.


1. In your widget code file or your module code file that manages the correct frontend view(MasterView or DetailsView) implement IBrowseAndEditable

public class ProductDetailsView : ViewBase, IBrowseAndEditable

Add the interace implementation

        //Adds browse and edit commands to be executed by the toolbar
        public void AddCommands(IList<BrowseAndEditCommand> commands)
        // Represents the browse and edit toolbar for the control
        public BrowseAndEditToolbar BrowseAndEditToolbar
                if (this.browseAndEditToolbar == null)
                    this.browseAndEditToolbar = this.Container.GetControl<BrowseAndEditToolbar>("browseAndEditToolbar", true);
                return this.browseAndEditToolbar;
        BrowseAndEditToolbar IBrowseAndEditable.BrowseAndEditToolbar
                return this.BrowseAndEditToolbar;
        //Gets the information needed to configure this instance.
        public BrowseAndEditableInfo BrowseAndEditableInfo
private BrowseAndEditToolbar browseAndEditToolbar;
private List<BrowseAndEditCommand> commands = new List<BrowseAndEditCommand>();

In InitializeControls method add

if (SystemManager.IsBrowseAndEditMode)
                    var bem = BrowseAndEditManager.GetCurrent(this.Page);
                    if (bem != null)

The last step is to add BrowseAndEdit toolbar control to your template

<%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %>
<sf:BrowseAndEditToolbar ID="browseAndEditToolbar" runat="server" Mode="Edit"></sf:BrowseAndEditToolbar>

When you activate browse and edit functionality on the frontend of your site you will see the edit button where your widget is placed and editing it will take you to the widget designer or module item edit view.


The Progress Team

View all posts from The Progress Team on the Progress blog. Connect with us about all things application development and deployment, data integration and digital business.

Comments are disabled in preview mode.
Latest Stories in
Your Inbox
More From Progress
5 Questions Automakers Should Ask to Improve Asset Uptime
Download Whitepaper
2018 Gartner Magic Quadrant Web Content Management (WCM)
Download Whitepaper
What Serverless Means for Enterprise Apps
Watch Webinar