It should be possible to add a student and change the Add Dialog. I used the Custom add fields plugin (thanks for that).
The process of adding a student by name works great and the detection of existing url slugs works.
But in the Add Dialog (if the name exists) a message appears that the given url already exists. Thats the expected behaviour but the page ist created with a timestamp (Custom Add Fields behaviour).
Is there a possibility to prevent page creation if the url exists in the hookPageCreate?
Hm, ok, looks like the page is first created and then renamed with the information from the model in a page.create:after hook. So in this case, you canβt prevent page creation. Hm, maybe this can be handled by the plugin, @steirico?
thank you for that solution. Didnβt try jet but chatching the error makes sense .
I ran into another issue that makes the plugin not useable for me.
My Setup is kirby version 3.1.0 and the latest Custom add fields release.
The dialog created by the Plugin does not validate required fields anymore.
I checked the index.js file and the latest commits on github but i could not determine why the validation process is not triggered. So pages are added even if (required) fields are emtpy.
The default Add Dialog of kirby works as expected.