How to customize the field's title present in the "Navigate to sections and Fields" (see image below).

Let's say - if I have field called "Summary" in the template. How to change the text of it based on the sitecore item location (Multisite) inside CMS.

I have tried to customize the below processor present in "getContentEditorFields" pipeline. Is this the correct place to do it or there is any other better approach. Sitecore.Shell.Applications.ContentEditor.Pipelines.GetContentEditorFields.GetFields

enter image description here

  • 1
    Don't do it. It's a trap! Oct 25 '20 at 23:03

There is no way to customize it with OOTB pipelines/processors.

Code responsible for this part of Content Editor lives in

class: Sitecore.Shell.Applications.ContentManager.ContentEditorForm

method: NavigatorMenu_DropDown

protected void NavigatorMenu_DropDown()
    // [..]
    foreach (Editor.Section section in (List<Editor.Section>) sections)
        htmlTextWriter.Write("<tr><td><a id=\"Nav_" + section.ControlID + "\" href=\"#\" class=\"scEditorHeaderNavigatorSection\">" + section.DisplayName + "<a></td></tr>");
        foreach (Editor.Field field in (List<Editor.Field>) section.Fields)
        // [..] - other code
        // you need to customize this
        string title = WebUtil.SafeEncode(StringUtil.GetString(field.TemplateField.GetTitle(Context.Language), field.TemplateField.Name));
        htmlTextWriter.Write("<tr><td><a id=\"Nav_" + str1 + "\" href=\"#\" class=\"scEditorHeaderNavigatorField\">" + title + "<a></td></tr>");
    // [..] - other code

Once you create your own version of ContentEditorForm class you will have to let Sitecore know to use it instead of the default one.

To do it you need to overwrite following file:

Website\sitecore\shell\Applications\Content Manager\Default.aspx

Put your class name with full namespace and DLL here.

<sc:CodeBeside runat="server" Type="Sitecore.Shell.Applications.ContentManager.ContentEditorForm, Sitecore.Client" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.