Which event am I supposed to use if I want my plugin to run when a page is moved? If I use the "Edit document" to move the page I can use the "OnDocFormSave" but if I move the document directly in the document-tree, this is not triggered.
I found out that "OnBeforeCacheUpdate" and "OnCacheUpdate" is triggered at this time, but this is a more general event that is triggered OFTEN! (e.g every save.)
Is this the best event to use. As I said: I want to detect when a page is moved (or when the path (or alias, or friendly urls) is changed...).
-
MODX Staff
- 12,272 Posts
I don’t think we have any events currently that address such instances, although I can see them being important, particularly with friendly alias paths on and soon-to-be-dead links. Can propose the events you’d like to see added, and where they would go in the doc parser or more likely in the relevant manager page code?
Ryan Thrash, MODX Co-Founder
Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
Perhaps "move_document.processor.php"?