-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
550e2a5
commit 78d02e5
Showing
9 changed files
with
257 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2022 Infocaster BV | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | ||
the Software, and to permit persons to whom the Software is furnished to do so, | ||
subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS | ||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR | ||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER | ||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | ||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,99 @@ | ||
# Datefolders | ||
This package creates Datefolders (year/month(/day)) for the specified doctype for Umbraco 9. For umbraco 8 use v3, for older versions please use v2 | ||
<h3 align="center"> | ||
<img height="100" src="docs/assets/infocaster_nuget_yellow.svg"> | ||
</h3> | ||
|
||
# Behavior | ||
<h1 align="center"> | ||
DateFolders | ||
|
||
[![Downloads](https://img.shields.io/nuget/dt/Infocaster.Umbraco.DateFolders?color=ff0069)](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/) | ||
[![Nuget (with prereleases)](https://img.shields.io/nuget/vpre/Infocaster.Umbraco.DateFolders?color=ffc800)](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/) | ||
![GitHub](https://img.shields.io/github/license/Infocaster/DateFolders?color=ff0069) | ||
|
||
</h1> | ||
This package makes it easy to separate your content base on the day on which it is added. | ||
With websites becoming bigger and bigger it is important that the content editors can easily find their content. This package makes that possible! | ||
A great use case for this is a website that shows articles or blog posts. With this package they will always be ordered correctly by date, no matter how many items the content editor has written. | ||
|
||
|
||
## Requirements | ||
This package creates Datefolders (year/month(/day)) for the specified doctype for Umbraco 8.2.x+ . For umbraco 7 use v2 and older versions please use v1.4 <br> <br> | ||
**for Umbraco 9 use version 9.0.x and above!** | ||
|
||
## Getting Started | ||
The DateFolders package is also available via NuGet. Visit [The DateFolders package on NuGet](https://www.nuget.org/packages/Infocaster.Umbraco.DateFolders/). | ||
After installing the package, just complete the configuration steps below and you'll be good to go! | ||
|
||
## Behavior | ||
- When you create a document with doctype "itemDocType", this package will automatically create year/month/day folders for it | ||
- When you edit the "itemDateProperty", the document is automatically moved to the correct year/month/day folder | ||
- Automatically cleans up empty year, month and day folders | ||
- Orders the items in the year, month and dayfolders by "itemDateProperty" with every action | ||
|
||
## Configuration | ||
Add these keys/values to your appsettings.json in a new section: | ||
|
||
<pre> | ||
```json | ||
"DateFolders": { | ||
"ItemDateProperty": "", // the property of the itemDocType to read the date from (e.g. "startDate") (don't add this key if you just want to use the document's create date) | ||
"CreateDayFolders": false, // boolean indicating whether or not day folders should be created | ||
"OrderByDescending": true, // boolean indicating sort order for date folders (default: false) | ||
"FolderDocType": "dateFolder", // the doctype to use for creating the year/month/day folders (e.g "DateFolder") | ||
"ItemDocTypes": [ "contentPage" ] // the doctype alias to create datefolders for (e.g. "newsItem") - multiple doctype aliases are allowed | ||
"ItemDateProperty": "", | ||
"CreateDayFolders": false, | ||
"OrderByDescending": true, | ||
"FolderDocType": "dateFolder", | ||
"ItemDocTypes": [ "contentPage" ] | ||
} | ||
</pre> | ||
``` | ||
|
||
- **ItemDocTypes** | The doctype alias to create datefolders for. (e.g. "contentPage") - comma separated values are allowed for multiple doctype aliases | ||
- **ItemDateProperty** | The property of the itemDocType to read the date from. (e.g. "startDate") (don't add this key if you just want to use the document's create date) | ||
- **DateFolderDocType** | The doctype to use for creating the year/month/day folders. (e.g "DateFolder") | ||
- **CreateDayFolders** | Boolean indicating whether or not day folders should be created, if false only years and months are created. | ||
- **OrderByDecending** | Boolean indicating sort order for date folders (default: false) | ||
|
||
## Credits ## | ||
The Support Module is made by Infocaster, a Dutch company dedicated to improving your Umbraco experience. | ||
|
||
## Changelog | ||
Version 9.0.0 | ||
- Updated to use umbraco v9. | ||
|
||
Version 3.0.0 | ||
- Updated to use umbraco v8. | ||
|
||
Version 2.1.2 | ||
- Fixed nested date folders. | ||
- Fix to sort | ||
|
||
Version 2.1.1 | ||
- Fixed cast error when using Date picker with DB type date. | ||
|
||
Version 2.1 | ||
- Removed legacy configuration settings | ||
- Added datefolders:OrderByDecending | ||
- Implemented fix for 'Publish At' given by - Wayne Godfrey | ||
- Refactored to reduce code complexity | ||
|
||
Version 2.0.1 | ||
- Fix to order by child name | ||
|
||
Version 2.0 | ||
- Updated to use umbraco v6 api. | ||
- Fixed ordering to handle non date folders. | ||
|
||
Version 1.4 | ||
- Removed Threading (Threading can cause the back-end to be out-of-sync, therefore removed) | ||
- Changed configuration keys, added prefix (legacy still works) | ||
- Added day folders feature (configurable, off by default) | ||
- Fixed silly order by hard-coded propertyAlias bug | ||
|
||
Version 1.3 | ||
- Better exception handling (speechbubble) | ||
- Exception get's handled when the datefoler document type doesn't exist | ||
- Month folders are now named with a leading zero if the month number is a single number (01, 02 etc.) | ||
- Exception get's handled when a date item is created under the 'Content' root node | ||
|
||
Version 1.2 | ||
- Support for multiple docTypes (comma separated) | ||
|
||
Version 1.1 | ||
- Tree get's synced automatically | ||
|
||
<a href="https://infocaster.net"> | ||
<img align="right" height="200" src="docs/assets/Infocaster_Corner.png"> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.