Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Show custom page creation modal on edit pages

admin

Started by yhancik 3 years ago · 1 replies · 590 views
3 years ago

I'm following the cookbook recipe here: https://learn.getgrav.org/17/cookbook/admin-recipes#add-a-custom-page-creation-modal

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!

3 years ago

Last year I added an issue about this or very similar. I have no idea if anything will happen or if anyone has even seen it.

In case it helps, please consider adding a comment to my issue or at adding a thumbs up.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Plugins · by renedebaaij, 1 day ago
0 31 1 day ago
Plugins · by complanar, 3 weeks ago
6 383 2 weeks ago
Plugins · by BenLaKnet, 2 weeks ago
1 202 2 weeks ago
Plugins · by complanar, 1 month ago
2 478 4 weeks ago
Plugins · by Vladimir Novak, 2 months ago
3 754 2 months ago