Skip to content

Commit

Permalink
Merged PR 3843: Update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
BramvdBogaard committed Feb 10, 2022
1 parent 550e2a5 commit 78d02e5
Show file tree
Hide file tree
Showing 9 changed files with 257 additions and 21 deletions.
1 change: 1 addition & 0 deletions Infocaster.Umbraco.DateFolders.sln
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.gitignore = .gitignore
azure-pipelines.yml = azure-pipelines.yml
GitVersion.yml = GitVersion.yml
LICENSE = LICENSE
README.md = README.md
ReadMe.txt = ReadMe.txt
EndProjectSection
Expand Down
20 changes: 20 additions & 0 deletions LICENSE
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.
102 changes: 90 additions & 12 deletions README.md
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>
23 changes: 14 additions & 9 deletions ReadMe.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

_____ _ __ _ _
| __ \ | | / _| | | | |
| | | | __ _| |_ ___ | |_ ___ | | __| | ___ _ __ ___
Expand All @@ -7,18 +6,24 @@
|_____/ \__,_|\__\___| |_| \___/|_|\__,_|\___|_| |___/


-----------------------------------------------------------------
========================================================

Add the following configuration to your appsettings.json file:

"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" ]
}

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

More information: https://our.umbraco.com/packages/developer-tools/datefolders/
For more information, check out the links below:
Github - https://github.com/Infocaster/Datefolders
Our Umbraco - https://our.umbraco.com/packages/developer-tools/datefolders
Binary file added docs/assets/Infocaster_Corner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/infocaster_nuget_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/assets/infocaster_nuget_pink.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/infocaster_nuget_yellow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions docs/assets/infocaster_nuget_yellow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 78d02e5

Please sign in to comment.