In another SO question, this was answered for usage within Blocks (Page selector (block development)). However, how do we apply this within the dashboard for example?
Variable "Concrete" and "ConcreteEvent" seem to be undefined within the admin. What would be the best way to approach this issue?
Example code (using 5.7.x):
Concrete.event.bind('ConcreteSitemap', function(e, instance) {
Concrete.event.bind('SitemapSelectPage', function(e, data) {
if (data.instance == instance) {
Concrete.event.unbind(e);
alert("You've selected a page! " + data.cID);
}
});
});