Is there an event handler that trigger when click or open a content node?
Is there an event handler that trigger when click or open a content node?
I need to change some content node info when editor open the node.
Thank you.
In a solution using the nuget version of umbraco this code will be in the umbraco folder i think in the umbraco.services.js. you will inject the eventservice into your controller and, after establishing the exact event triggered by putting a breakpoint on this line and debugging through create an eventsService.on handler for the correct event.
If that event does not do exactly the right job, by doing the debugging mentioned you may find another that looks something like nodechanged. Bear in mind however that strictly speaking one of these other events migh also get triggered at other times, not just as a result of clicking the tree node.
Is there an event handler that trigger when click or open a content node?
Is there an event handler that trigger when click or open a content node? I need to change some content node info when editor open the node. Thank you.
I havent got access to my code but look at this eventsService.emit("appState." + stateObjName + ".changed", { key: key, value: value });
https://github.com/umbraco/Umbraco-CMS/blob/75c2b07ad3a093b5b65b6ebd45697687c062f62a/src/Umbraco.Web.UI.Client/src/common/services/appstate.service.js.
In a solution using the nuget version of umbraco this code will be in the umbraco folder i think in the umbraco.services.js. you will inject the eventservice into your controller and, after establishing the exact event triggered by putting a breakpoint on this line and debugging through create an eventsService.on handler for the correct event.
See the final solution to a similar issue here https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/78841-get-selected-node-when-clicking-angularjs
If that event does not do exactly the right job, by doing the debugging mentioned you may find another that looks something like nodechanged. Bear in mind however that strictly speaking one of these other events migh also get triggered at other times, not just as a result of clicking the tree node.
is working on a reply...