Chancer
01/15/2024, 2:29 PMMike Chambers
01/15/2024, 5:46 PMUmbraco.AssignedContentItem.Parent.Root()
be accessible?Chriztian Steinmeier
01/16/2024, 6:28 AM$site
to get to the desired node.Jemayn
01/16/2024, 8:15 AMChancer
01/16/2024, 8:31 AMMike Chambers
01/16/2024, 9:36 AMhttps://localhost:44389/umbraco#/content/content/edit/19192?doctype=standardPage&create=true
that 19192 is the parent id, eg the node I right clicked to choose create...
š¦ silly me that can't be read serverside... at least not in .net..Mike Chambers
01/16/2024, 9:58 AMjson
function fn($scope, appState) {
appState.getTreeState("selectedNode").id;
}
should get that parent id from the active node in the content tree... š¤
š¤¦āāļø or indeed like in the fix mentioned above, injecting the editorstate..
json
// get current node (for page context)
var currentPage = editorState.getCurrent();
var currentPageId = currentPage ? (currentPage.id > 0 ? currentPage.id : currentPage.parentId) : null || -20;