Regenerate folder names (sort order) in a specific folder


#1

Hi there :slight_smile:

For several years I did create all my files in a local Kirby 1. I created them manually with a number in the folder name: 2048-title, 2049-title etc. I now switched to Kirby 2 and the 2 Blocks theme to bring the site only. That theme creates different folder names based on the date field: 20181231-title. That’s fine.

I can move all my existing folders into the new Kirby and it works. When I open old articles in the panel and save them (without doing a change) the file name will be changed to the date format. That’s fine.

Is there a way to automatically regenerate every filename without opening and saving several hundreds of posts in the panel?

Kind regards
Oliver


#2

Hm, that should actually happen automatically.

If it doesn’t, change the blueprint of the parent page to some other sorting, open the parent page in the Panel. The sorting should change. Then change the num option back to date and open the parent again in the Panel.

https://getkirby.com/docs/panel/blueprints/subpages-settings#numbering-of-subpages


#3

Hi there!

Thanks, it worked for most pages with either changing the sort order manually for a page or changing a page to be hidden. I had to recreate file names for some pages manually because Kirby seems to overlook them and then every folder was renamed :).

Bye