Posts: 11
Threads: 2
Joined: Nov 2011
I noticed that the 3.1 beta includes an event trigger named "changedata-aftersave" which is triggered after the "changedata-save" trigger and subsequent page save. Could you also add one named "page-afterdelete" to be fired after a page has been deleted? I hacked up my own copy of 3.0 to add this event as I needed to update some cached navigation files whenever pages were modified, but it had to happen after all of the changes were saved to disk.
Posts: 2,094
Threads: 54
Joined: Jan 2011
chrisbloom7 Wrote:I noticed that the 3.1 beta includes an event trigger named "changedata-aftersave" which is triggered after the "changedata-save" trigger and subsequent page save. Could you also add one named "page-afterdelete" to be fired after a page has been deleted? I hacked up my own copy of 3.0 to add this event as I needed to update some cached navigation files whenever pages were modified, but it had to happen after all of the changes were saved to disk.
You might try another approach: delete the cache and only recreate it when needed (when you want to display the navigation for the first time). This is how I18N and I18N Search work.
Posts: 11
Threads: 2
Joined: Nov 2011
mvlcek Wrote:You might try another approach: delete the cache and only recreate it when needed (when you want to display the navigation for the first time). This is how I18N and I18N Search work.
I would normally agree, but in my case I needed to create a file for use in a section of the site that doesn't run in GetSimple, so I need to create it as soon as the changes are made in the backend. I realize this is a special case, but I figure if you're going to have a trigger that fires after save you may as well have one that is triggered after deletion too.