Sitecore 8 adding edit meta data button in experience editor

Are you still making your content author to edit the content of a page using content editor? then stop.

For content author in Sitecore the best way for them to edit a page is to use Sitecore Experience Editor. This way they can focus on editing the content on the page with visual indication what would their changes would look like. However there are some cases where content can’t be edited on the page because they are not displayed on the page itself, Metadata information is such a case.

There are some guide already out there to set up an edit meta data button in page editor in Sitecore 7 and below, and here I would like to do the same in Sitecore 8. This is based on the guide that I’ve found on which can be reused to create other type of functionality.

First you need to install Sitecore Rocks, because in Sitecore 8 the interface is built using SpeakUI you may find it quite different with how you usually set up a new button in Sitecore 7 and below. I’ve also found it easier to create a SpeakUI component using Sitecore Rocks, so you definitely should check it out. After you’ve installed Sitecore Rocks and setup a connection to the Sitecore website you should see the following screen.



Expand the core database and go to sitecore->content->applications->webedit->ribbons->webedit

Here you can see a couple of familiar strips which is what being displayed on the experience editor



We want to add a new button to edit meta data here, so go in Sitecore Rocks and under the WebEdit node follow this steps

  • Add a new Page Properties strip
    • Add a new item with the template of Strip.
    • Set the header to “Page Properties” and the ID to “PagePropertiesStrip”
    • In Sitecore Rocks select tasks and design layout then add a new rendering of type Strip
  • Add a new Hidden Content chunk
    • Under the new Page Properties strip add a new item with the template of Chunk
    • Set the header to “Hidden Content” and ID to “HiddenContentChunk”
    • In Sitecore Rocks select tasks and design layout then add a new rendering of type Chunk
  • Add a new Edit Meta data button
    • Under the new Hidden Content chunk
    • Set the header to “Edit Meta Data” and ID to “EditMetaDataButton”
    • In Sitecore Rocks select tasks and design layout then add a new rendering of type LargeButton
    • Edit the rendering properties of the LargeButton
      • Set AccessKey to Meta Keywords|Meta Description (this the meta data fields that I’ve setup in Sitecore)
      • Set the Click property to trigger:button:click
      • Set the Command to LaunchFieldEditor
      • Set the PageCodeScriptFileName to the path of the LaunchFieldEditor.js file is


What it currently looks like so far



At this stage we still need to register the command to handle the edit meta data button functionality so let’s go ahead and do that.

The GenerateFieldEditorUrl class

The LaunchFieldEditor.js

update: if you’re using 8.1 + then the js code needs to be modified slightly – feedback from Yoki in the comments (and tested in 8.2u1)


After all have been setup correctly the content author can now edit the meta data button through the experience editor.


10 thoughts on “Sitecore 8 adding edit meta data button in experience editor

  1. Update Sitecore 8.1 for javascript:

    ExperienceEditor are no longer part of Sitecore. ExperienceEditor require to be defined implicitly to avoid of undefined Sitecore.ExperienceEditor.

    Below the code update:

    define([“sitecore”, “/-/speak/v1/ExperienceEditor/ExperienceEditor.js”], function (Sitecore, ExperienceEditor) {

    Sitecore.Commands.LaunchFieldEditor =
    canExecute: function (context) {
    return true;
    execute: function (context) {

    context.currentContext.argument = context.button.viewModel.$el[0].accessKey;

    ExperienceEditor.PipelinesUtil.generateRequestProcessor(“ExperienceEditor.GenerateFieldEditorUrl”, function (response) {

    var DialogUrl = response.responseValue.value;
    var dialogFeatures = “dialogHeight: 680px;dialogWidth: 520px;”;
    ExperienceEditor.Dialogs.showModalDialog(DialogUrl, ”, dialogFeatures, null);


      1. Hi Rahadian,

        I was tried with above code.but i am getting the issue in jquery. it shows the error “Uncaught TypeError: Cannot read property ‘generateRequestProcessor’ of undefined”.how to resolve this issue?

        1. Which Sitecore version are you using? this post was based on 8.0 release, the recent update for 8.1 have a slightly different approach for the LaunchFieldEditor.js

          I recently tried to implement this on 8.2u1 release using the js code update and it’s working fine

  2. Hi Radhian,

    I tried everything what you mentioned in the article.I checked the log files shows “Could not instantiate speak request object”.I am using sitecore 8.1 upgrade 3,Visual studio 2015 professional.please let me know how to resolve this issue?

    please respond As soon As Possible.

    Thanks in Advance

  3. What does it even means

    “In Sitecore Rocks select tasks and design layout then add a new rendering of type Strip”


Leave a Reply

Your email address will not be published. Required fields are marked *