November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
have not come across this scenario before but if your editors are changing properties in the OnPage edit view, have you tried
@Html.FullRefreshPropertiesMetaData(new[] { "your-content-area" })
No that won't help. It simply provides a "map" structure when the page is loaded so that properties within the page can tell wether it should update or not if another property is change. But the change must originate client side - it doesn't provide a channel from serverside.
Let me tear down the problem to a simple one;
On the edit page, i want a button: "Populate".
When pressed, i want to change the content of the page (multiple properties) server-side.
Once pressed, i want epi to understand the content have changed, and the editor should act accordinly and refresh (lighting up the "publish" button, for instance).
The server-side part is no problem. I have my api endpoint on which i send a POST request once the button is pressed. What i lack is the ability to tell epi the content have changed. How can i perform this?
I believe you need to create a context-sensitive component. Once properties changed from the backend you need to notify context and push a message for content editors.
the following documentation will be useful https://world.episerver.com/documentation/developer-guides/CMS/user-interface/Context-sensitive-components/
As mentioned, the only way to update the Epi interface after you have made an update through the backend is to have a Dojo component that updates the front-end. When changes occur in the editor interface, the Dojo components actually call back to the back-end to save the changes, and the updates you then see in the editor are made by Dojo as well. Changes to the editor are not actually based on what happens in the back-end. The only way to see a back-end change without a Dojo component performing an update or save event is to refresh the entire interface.
This should help you https://world.optimizely.com/documentation/developer-guides/CMS/Content/Properties/property-attributes/
Look for ReloadOnChange attribute. This attribute allows to force-refresh the current content context on the server and force rerender all other properties.
More info:
I am performing some property changes via api calls to backend and i need to tell the editor to refresh its state. Right now, the "Publish" button does not get lit since the editor doesn't detect the backend changes - how can i tell the editor properties has changed and that it should refresh its state?
Obviously i am not using custom Dojo widgets and i would like to avoid it if i can. I use window.epi.subscribe() to detect changes performed by epi but i cannot find a similar notification i can use with window.epi.publish() to tell epi the same thing.
What am i missing? Surely i can't be the only person in the world with this issue.