I'm using the datefolder package to manage a press release document type. I have modified the source (in the Document_New method) so that it only uses the year and month from the date and doesn't create a folder for the day (this way the press releases get grouped under each month) . Each press release also has a date property assigned by the user. When the press release document is created, the datefolder package automatically creates the correct year and month folders and it all works fine.
Now I'm wondering if anybody has modified this package (or something similar) so that if a user then changes the press release date property, then the press release document is moved to the folder corresponding to the new date? It would obviously need to check if the new year and month folders exist, and if they do then the document would be moved, otherwise new year and month folders would be created.
Datefolder - changing the Datefolder on save
Hi,
I'm using the datefolder package to manage a press release document type. I have modified the source (in the Document_New method) so that it only uses the year and month from the date and doesn't create a folder for the day (this way the press releases get grouped under each month) . Each press release also has a date property assigned by the user. When the press release document is created, the datefolder package automatically creates the correct year and month folders and it all works fine.
Now I'm wondering if anybody has modified this package (or something similar) so that if a user then changes the press release date property, then the press release document is moved to the folder corresponding to the new date? It would obviously need to check if the new year and month folders exist, and if they do then the document would be moved, otherwise new year and month folders would be created.
I hope this makes sense, its a bit of a mouthful.
Thanks.
Just realised this should probably go under the API forum area, sorry bout that.
Hi jonok,
Have a look the release of Autofolders 2.0 beta (http://our.umbraco.org/projects/autofolders), this supports all the functionality you've discussed.
AutoFolders will move the document if the date is changed.
Cheers,
Chris
I cannot get the AutoFolders package working, period. No idea what I'm doing wrong, but it won't create subfolders.
works for me
is working on a reply...