I would like to add a quick link in the admin panel to create a new page.
It is possible to go to all pages by configuring /admin/pages
. Has anyone found the link to directly create a new empty page or show the modal popup?
(/admin/pages#modal
is not working)
Hi @metbril, one technique to do something like this is creating a custom Admin Panel dialog and Button Bar item - docs are https://learn.getgrav.org/cookbook/admin-recipes#add-a-custom-page-creation-modal
And here is a little video demo:
I’ve done this in my Open Course Hub Skeleton too, if you want to explore a working example:
Hope the above helps.
Paul
I have tried adding the custom modal, and that works fine. Nice tip.
However, this does not solve my problem. The custom form still is a modal dialog, without it’s own url in the admin panel. This is needed to be able to directly add is to the Quick Tray.
Or have I perhaps misinterpreted your suggestion?
Oh, this was a suggested alternative You likely can do what you are looking for with a Custom Plugin if the above is not close enough - perhaps someone more dev-oriented might share their thoughts here?