Custom Editors - Sitecore


This article walks through how to create a custom item editor in Sitecore.


Master Database

1. Create a content item somewhere under /sitecore/Content in the usual way: with layout and sublayout, and specifying the Presentation Details.

2. Grant read access to the administrative users (e.g., sitecore\admin) and roles that will need to use the content editor page

3. Publish the item, as well as its layouts and sublayouts.

Core Database

4. Switch to the Core database

5. Within Content Editor, navigate to /sitecore/content/Applications/Content Editor/Editors and create a new folder to hold your custom editor. Naming it according to your company or project is recommended.

6. Within the new folder, create a new items based on the /sitecore/templates/Sitecore Client/Content editor/Editor template.

7. Fill in the following fields, all of which are in the Data section

HeaderThe text that ends up on the tab
UrlThe full Sitecore path to the item
RefreshOnShowAlways select this

Master Database

8. Assign the editor: on either the item of interest or the standard values of a template, within the Appearance section, specify the new editor in the Editors field.

Coding the Editor

Coding the editor is the same as with any Sitecore coding with one exception. The current item is determined from the query string, as follows.

var contextItem = Sitecore.Context.Database.GetItem(Request.QueryString["id"]);