I am looking for a system event that is called when a document is moved.
My plugin, automaticTpl is using OnDocFormPrerender to set the template of a new document.
I would also like to change the template of the document when it is moved. I know it’s not a "nice" thing to do but I was wondering if it is possible.
Thank You
-
☆ A M B ☆
- 24,524 Posts
When a document is moved, the cache is updated, so you could use the OnBeforeCacheUpdate or OnCacheUpdate event. You could then check and make sure the document has the template it should have. If there’s no document ID ($_REQUEST[’id’]) available (this wasn’t a document editing/moving cache event), just return to normal processing.