I’m following the cookbook recipe here: Admin Recipes | Grav Documentation
I managed to create the custom modals, and they work nicely when I’m on /admin/pages.
But I’d like them to also work when I’m editing a content page.
When I use show_in: bar
in admin.yaml, the button doesn’t show in the content editing page bar at all. When I use show_in: dropdown
, the button appears in the dropdown but doesn’t work (because the associated remodal div doesn’t exist in the page).
I feel that this might be something going on in the pages.html.twig (although reading through it i don’t quite understand why the button appears at all in the dropdown in edit mode, or why the modal div doesn’t exist in the same mode), but I also seem to struggle to override it (which I tried this way).
Pointers welcome!