Getting the Id of the selected Node when using custom menu option
I've added a custom menu option for specific nodeTypes in the tree as seen in the Image below
The issue is that I need to know the currently selected Node. So when running either 'Synchronize' command I know what NodeID to run the synch on.
At this moment I try and get the id from the URL using either the list parameter or simply getting the ID from that last part of the URL.
But this only works when the node is actually opened.
Since it's also possible to run that command while having any other page open. I sort of presume there is a way to pass along the currently selected tree-node.
Getting the Id of the selected Node when using custom menu option
I've added a custom menu option for specific nodeTypes in the tree as seen in the Image below
The issue is that I need to know the currently selected Node. So when running either 'Synchronize' command I know what NodeID to run the synch on.
At this moment I try and get the id from the URL using either the list parameter or simply getting the ID from that last part of the URL. But this only works when the node is actually opened.
Since it's also possible to run that command while having any other page open. I sort of presume there is a way to pass along the currently selected tree-node.
Of course as soon as you decide to make a post about this, you find the answer.
For other people ending up here with the same question.
The currently clicked id is stored in
is working on a reply...