November 15, 2011

Add a publish button in the contextual menu

To add a publish button in the contextal menu as in the screenshot below it is very simple:

  1. Open the core database
  2. Go to the item /sitecore/content/Applications/Content Editor/Context Menues/Default and duplicate the item Insert for example
  3. Set the fields values to:
    1. Display Name: Publish Item
    2. Message: item:publish(id=$Target)


  1. Very nice idea. How does $Target get populated?

  2. $Target correspond to the current item in the content editor but I don't know exactly how it is populate in the code I suppose that it is a parameter in the command. You can look at the Command.config to know witch is the class executed.

  3. Hey.
    Thanks a Lot. I have been searching such code.