Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
i'm importing some content and i need to have control over the date folders. I have following code. I've looked at the source for autofolder and the date seems to be derived from CreateDateTIme. Here is the code that i'm using. My issue is that the date seems to always default to today date.
Document currentPage = Document.MakeNew("mypage", dt, author, parentNodeId);
currentPage.CreateDateTime = DateTime.Parse("15-May-2009");
Basically, this is occurring because the CreateDateTime is the time that the new item is created, which would be today's date. You can't override this. What you need to do is to tell autofolders to use the value in a field (on Publish) rather than the CreateDateTime.
Version 2.0 allows you to do what you are asking.
Great thanks Chad.
<folderProvider alias="DateFolderProvider_Full" assembly="/bin/AutoFolders" type="AutoFolders.Providers.DateFolderProvider"> <property alias="DayFormat">dd</property> <property alias="MonthFormat">MM</property> <property alias="YearFormat">yyyy</property> <property alias="DateField">MyReleaseDate</property> </folderProvider>
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted