Since nobody actually posted this, the actual id of the current node on the editorState is:
editorState.current.id
I'm wondering now that umbraco is using some cachebusting (is nice on prod) to load the javascript if there is a way to disable that as it makes it impossible to put breakpoints in the chrome console. I had to console.log to get the id.
How to get current ID within v7 Property Editor
Is there an established way to get a content/media item's ID from within a property-editor? (v7.0.3+)
Looking from the options, I can either:
id
)Any other options?
Thanks,
- Lee
I think there's a service for this, I asked Per about it a while ago. I'll have a look and see if I can find the email......
Apparently it's in the editorState? Not sure how you get to that though, I haven't had time to get any further on it.......
Thanks Tim, much appreciated. I'll have a dig around.
You can use '$routeParams':
editorState also very interesting to get a lot of the information about the node like the alias:
oops... just noticed that I cross-posted with Arnold (removing my message) :-)
For reference: I was ultimately after the parent ID, so I am using
editorState.current.parentId
to do that.Since nobody actually posted this, the actual id of the current node on the editorState is:
I'm wondering now that umbraco is using some cachebusting (is nice on prod) to load the javascript if there is a way to disable that as it makes it impossible to put breakpoints in the chrome console. I had to console.log to get the id.
Sorry all, posted here even though i meant to start a new thread.
If you select the node then all this is relevant - but if you have selected a node, for example ID 1202.
Then you right click on a different node in the tree - you still get the selected id of 1202.
How can you get the ID of the node that you have just right clicked on?
Jon
is working on a reply...