1

I have an EditFrame on a component and I need to make some changes on some fields, and it depends on some factors. I catch the events when the edit frame fields are saved like on this blogpost: https://blog.trivident.com/automatically-refresh-page-in-sitecore-experience-editor-after-updating-a-component/ but I am not able to get current page item inside the processor : ReturnFieldEditorValues.SetValues

Sitecore.Context.Item show me FieldEditor value:

enter image description here

I tried few others things but I couldn't find a way to get the current page item.

2
  • Did you try GetViewStateString("ItemID")?
    – Mark Cassidy
    Commented Dec 21, 2021 at 13:11
  • in the class ReturnFieldEditorValues.SetValues I don't have access to GetViewStateString, looks like this method is part of the Sitecore.Web.UI.HtmlControls.Component and all the classes which inherit from it. Commented Dec 21, 2021 at 16:35

1 Answer 1

0

As far as I can see, that's not really possible.

When you open an iframe, an url like /sitecore/shell/applications/field editor.aspx?mo=mini&hdl=BC6886B8396B47CBB3345D82B6501C47} is executed and it loads a modal with editor for fields of the item passed to edit frame.

As far as I'm aware, the request doesn't have any information about the original page, it only has information about the item passed to iframe.

And what is more, you cannot even check url referrer, as ReturnFieldEditorValues is called in second request, when you close the modal.

The only idea I have is adapting the code which opens field editor.aspx url to include page item id there as well.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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