Organizing Articles by Date Automatically in Umbra...
# help-with-umbraco
k
Hi everyone, I’m working on a news website project using Umbraco, and I’ve come across an issue with organizing articles efficiently. Currently, my content structure looks like this: HomePage -> News Category --> Article 1 --> Article 2 I realized this setup might become inefficient as more articles are added over time. I’m looking for a way to automatically organize articles into folders based on their creation date. For example, I want new articles to be placed in folders corresponding to the date they were created. Is there a method or a feature in Umbraco that can help with this? Ideally, I’d like the system to handle this automatically so that each new article is sorted into the appropriate date-based folder right from the start. Any guidance or suggestions would be greatly appreciated!
a
Isn't enabling "List View" good enough on the "News Category" document type ?
then you get a sortable and searchable list
If you really want to make something automatic i'd look into the content service notifications. With these you can 'trigger' stuff on creation or modification. https://docs.umbraco.com/umbraco-cms/reference/notifications/contentservice-notifications
d
Have I got a package for you!
Infocaster datefolders creates folders by year, month and optionally by day and automatically sorts your articles by date.
k
oh wow thank you!
@D_Inventor this is the document types i had and i put this in my appsettings.json as a root "DateFolders": { "CreateDayFolders": false, "OrderByDescending": true, "FolderDocType": "dateFolder", "ItemDocTypes": [ "baseArticle" ] } i am confused as to whats supposed to happen or how do i make sure the package is working or if im doing something wrong https://cdn.discordapp.com/attachments/1264538544785981461/1265286602268217344/451822436_1012988503320072_7756593663525699702_n.png?ex=66a0f579&is=669fa3f9&hm=6b5d1897410def5a7cddb5b817e00e67f8c73778ddf6a0d450f9279fdb797ab9& https://cdn.discordapp.com/attachments/1264538544785981461/1265286602490646700/448762314_327220217022882_1118444956000614709_n.png?ex=66a0f579&is=669fa3f9&hm=44516e123fc42b55bb2b3fbb79fe4a607c6be791cb8d96f9054fc399bbd39b93&
d
This looks like Umbraco 14. I haven't tested the plugin yet in Umbraco 14, but I know for sure that it works in Umbraco 13. That being said, the logic executes as soon as you hit "Save & Publish", so once you boot up, you should try saving and publishing an item of type "baseArticle" and then it should appear inside a datefolder. You may need to refresh your browser, as the Umbraco 14 frontend has some stronger caching behaviour and it may not be immediately aware of the changes that are made in the backend
k
okay
thank you
@D_Inventor okay im sorry if im being a nusiance but i tried to create a new doctype its giving me an error and i saw it in the logs and it was this. Do you have any idea what this might be https://cdn.discordapp.com/attachments/1264538544785981461/1265296222563078219/message.txt?ex=66a0fe6f&is=669facef&hm=824d0ff1de4e70616e48f4e1a7df26fee8a4c860e38d88e0538eab9234a53ded&
Im going to try to create a new project maybe instead but if you have any clue what might be the cause please tell me
d
hmm, I guess this might just be an "Umbraco 14" bug. Things work somewhat different in that version. The latest tested version was Umbraco 13
7 Views