Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Add a custom page creation modal for MODULAR type page

Started by ryan pao 8 years ago · 2 replies · 1335 views
8 years ago

Hi all,

Please help I'm totally stumped on this

I'd like to create a modal like in recipe
for modular pages.

I've created a working copy of blueprint, but when I try to save it the blueprint cannot be found.

the yaml file is saved in user/themes/MY-THEME/blueprints/modular/target.yaml
instead of MY-THEME/blueprints/target.yaml.

or

how can I make a page page creation modal for modular page like in "ADD MODULAR" found in
admin/pages/ top right button

thanx

8 years ago

Hi @ryan, for this technique you actually need two blueprints - one for the creation dialog and one for editing the page.

You can see a complete working example in my Open Course Hub skeleton...

Create Admin Panel Button Bar items:
https://github.com/hibbitts-design/grav-skeleton-course-hub/blob/master/config/plugins/admin.yaml#L46-L50

Add item blueprint (note file location):
https://github.com/hibbitts-design/grav-skeleton-course-hub/blob/master/blueprints/admin/pages/new_blog_item.yaml

For editing a page, you would place the page blueprint in the usual spot, your example for a modular blueprint looks right assuming MyTheme is the active theme. Here are a few more examples:
https://github.com/hibbitts-design/grav-theme-bootstrap4-open-matter/tree/master/templates/modular

Hope the above helps,
Paul

8 years ago

Thank you!! @paulhibbitts

Add item blueprint (note file location):
is the key to solving this puzzle!!

what I previously did was to make an symbolic link to the first blueprint.-->didn't workout

Thank you very much!!

Suggested topics

Topic Participants Replies Views Activity
Support · by TomW, 2 weeks ago
8 225 8 hours ago
Support · by alex, 2 months ago
8 666 23 hours ago
Support · by Supple, 5 days ago
1 97 1 day ago
Support · by TomW, 1 week ago
3 158 3 days ago
Support · by TomW, 6 days ago
2 105 5 days ago