Thursday, July 12, 2018

Sitecore Experience Editor Mods in MVC

Normally in Sitecore you need an EditFrame to handle editing of Droplists in the Page editor. This however is not supported in MVC by default, but there's a great post here on how to get it working:
Alternatively you can set a 'custom experience button' to enable editors to change the droplist value when in the Page editor:
To set this up follow these steps:
  1. Change to Core database
  2. Create a new item under /sitecore/content/Applications/WebEdit/Custom Experience Buttonsusing the template /sitecore/templates/System/WebEdit/Field Editor Button
  3. In this new item, set the value of the 'Fields' field to the name of your templates DropLink field (also set appropriate icon/header/tooltip field values)
  4. Go back to the master database
  5. Select your sublayout/rendering and in the field 'Page Editor Buttons' select your newly created button item.
Once this is setup when you edit the component and click the button editors will be able to change the value for the droplist.