Search code examples
c#sitecoresitecore8sitecore-mvc

Sitecore 8: jump to specific section in content editor from page editor


We're currently building a site using Sitecore 8.1 using MVC. We're supporting Page Editor where possible, but sometimes we're forced to drop into content editor to make some updates.

I currently have a page content item with several sections of fields all included directly on the content item; rather than having rendering specific data items per page. In Page Editor, we've made it so you can edit some data inline where possible. But in some cases, we need the content editor to use the "edit the related item" menu selection to make edits. Because the data is contained on the page content item, "edit the related item" always loads up the content editor and points it at the page content item, which is fine. However, it doesn't jump down to specific section of the content item to edit, it just goes to the top and leaves it to the content editor to find it.

In retrospect, we should have just went with renderings with their own dedicated datasource items, so it would jump to the rendering's specific content item and data, rather than the page item. But rebuilding the pages now to use dedicated data sources for renderings would take a lot of time that we don't have.

What I want to know is; is there a way to give a hint to the "edit related item" button to tell it what section of the page content item to jump to?


Solution

  • Not aware of any way of jumping to a specific section, but rather than switching over to the Content Editor you should instead use EditFrames to allow the user to edit the specific fields directly from the Experience Editor using a pop up containing just those fields.

    If you are using Glass Mapper (version 4) then this is extremely easy to add Edit Frames.

    You can achieve the same in Sitecore MVC by following this blog post, it's not possible out of the box.

    If you're using Webforms then this is standard Sitecore functionality and will works similar to above, you can find the steps in this blog post.