Order/group article items

Ethan Nguyen asked on December 23, 2021 04:57

How can we order/group article items into folders as the image https://prnt.sc/2442l2z?

Recent Answers


David te Kloese answered on December 23, 2021 10:08

What Kentico version and Dev Model are you using?

If you're using Portal You could use the "Hierarchal viewer"-Web Part and order by "NodeOrder", that should sort itself out...

If you're doing it in MVC/Core you'll need to get the nodes and sort them per NodeOrder but need to include the ParentNodeID to sort them under the correct parent.

0 votesVote for this answer Mark as a Correct answer

Ethan Nguyen answered on December 23, 2021 10:15 (last edited on December 23, 2021 10:16)

Thank you for Your information @David te Kloese. I am using K13 MVC5. Do you mean need to write custom code to get all nodes and sort/move them into folder Year/Month. Do you know any code simple/guide?. I need to sort them in CMS Admin

0 votesVote for this answer Mark as a Correct answer

David te Kloese answered on December 23, 2021 10:26

Oh in the admin, so you want to automatically create sub folders like the old school Blog used to do?

Easiest would be to create a Global event Handler that reacts Before the page is created and checks if there is already a folder structure.

As it there are quite some logic cases you have to check for isn't it easier to just let the editor handle it? By only allowing "years" and "month" folder page types under the year... forcing them to just place it in the correct folder or create it?

0 votesVote for this answer Mark as a Correct answer

Ethan Nguyen answered on December 23, 2021 10:39

Thank you for your quick response. Yes, will automatically create subfolders(Year/Month)base on the publication date. Currently, all blogs will just be listed in a big long list. After time, if they have hundreds of blogs, this will get very difficult. Can we just folders under the blogs so that these can be ordered better?

0 votesVote for this answer Mark as a Correct answer

Ronald Holtzclaw answered on December 31, 2021 07:22

I am using Portal and I use the "Hierarchal viewer"-Web Part and order by "NodeOrder", that should sort itself.. What you use?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.