I figured a way to automatically change slugs and handle redirect properly in the panel

As I was breaking my head my head trying to figure things out on how to automatically change slugs and handle redirect properly in the panel yesterday. I came to a working solution that work perfectly for the current need on a project I am actually on.

The code

You can download it here:


Readme

Instruction

Simply add the field and parameterslug-autoid: true on the page where you wish to add the slug-autoid to the page slug :

Dependancies

For our need, the amazing following plugin was necessary: kirby3-autoid
However, it is possible to change the code and apply the slug update you want to this “draft” plugin

Disclaimer

This is the first draft of a plugin that we need for internal purpose.
This plugin is provided “as is” with no guarantee. Use it at your own risk and always test it yourself before using it in a production environment.
Feel free to modify or remix it if you need it.

License

MIT

After being very happy to have found your plugin, I just realized, that it’s not working anymore due to breaking changes introduced with Kirby 3.6.
I managed to fix some of it, but in the 3.6 changelog it says

vue-router has been completely removed, use Panel areas to define custom Panel routes.

I don’t know hot to do that. this.$router.push(redirect) throws an error.

Were you able to get this working with 3.6?

I will look to modify it when we migrate to 3.6. Thanks for the update !