Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Plugins

Show custom page creation modal on edit pages

admin

Started by yhancik 3 years ago · 1 replies · 414 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 Rene, 1 week ago
2 49 1 week ago
Plugins · by Xavier, 4 weeks ago
2 57 4 weeks ago
Plugins · by Luka Prinčič, 7 years ago
3 1184 1 month ago
Plugins · by Sebastian van de Meer, 1 month ago
1 50 1 month ago
Plugins · by PIERROT Alain, 2 months ago
3 75 2 months ago