This package creates Date Folders (year/month(/day)) for the specified doctype for Umbraco 7.0.0 and upwards.
It uses the latest Umbraco API’s for manipulating the content tree in the back office. Any exceptions should also be logged to the default Umbraco Log file (found here “~/App_Data/Logs”).
- Will automatically generate Date Folders (year/month/day) for any node specified in the “ItemDocTypes” app setting
- When you edit the "ItemDateProperty", the document is automatically moved to the correct year/month/day folder
- Automatically cleans up any empty Date Folders (year/month/day)
Add the following key/values to your appSettings section in the web.config.
- Key: “SleepyMedia.DateFolder:ItemDocTypes” – the DocType alias(es) you want to create date folders for (e.g. newsDetail). - comma separated values are allowed for multiple doctype aliases (see Example AppSettings section below).
- Key: “SleepyMedia.DateFolder:ItemDateProperty” – the property of the ItemDocTypes to read the date from (e.g. postDate, startDate etc.)
- Key: “SleepyMedia.DateFolder:YearDateFolderDocType” – the alias of the DocType folder to use for the Year folder(s).
- Key: “SleepyMedia.DateFolder:MonthDateFolderDocType” – the alias of the DocType folder to use for the Month folder(s).
- Key: “SleepyMedia.DateFolder:DayDateFolderDocType” – the alias of the DocType folder to use for the Day folder(s).
<add key="SleepyMedia.DateFolder:ItemDocTypes" value="blogDetail,newsDetail"/>
<add key="SleepyMedia.DateFolder:ItemDateProperty" value="articleDate"/>
<add key="SleepyMedia.DateFolder:YearDateFolderDocType" value="yearFolder"/>
<add key="SleepyMedia.DateFolder:MonthDateFolderDocType" value="monthFolder"/>
<add key="SleepyMedia.DateFolder:DayDateFolderDocType" value="dayFolder"/>
To get the Date Folders to work on a ListView, just enable ListView for all DocTypes (i.e. News, Blogs, Year/Month and Day folders).