1 vote

SleepyMedia.DateFolders

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”).

 

General Behaviour

-        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)

 

Configuration

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).

 

Example AppSettings

<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"/>

 

Extra Notes

 

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).

Screenshots

Project owner

Craig Mayers

Craig Mayers

Craig has 265 karma points

Project Compatibility

This project is compatible with the following versions as reported by community members who have downloaded this package:
Untested or doesn't work on Umbraco Cloud
7.6.x (untested)
7.5.x (untested)
7.4.x (untested)
7.3.x (untested)
7.2.x (untested)
7.1.x (untested)
7.0.x (untested)
6.1.x (untested)
6.0.x (untested)

You must login before you can report on package compatibility.

Project Information

  • Project owner: Craig Mayers
  • Created: 23/05/2017
  • Current version 1.0
  • .net Version 4.6.1
  • License GPL
  • Downloads: 41