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.

Support

Add a custom page creation modal for MODULAR type page

Started by ryan pao 7 years ago · 2 replies · 738 views
7 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

7 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

7 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 Thomas, 1 week ago
2 54 12 hours ago
Support · by Anna, 3 days ago
2 60 15 hours ago
Support · by Justin Young, 16 hours ago
1 30 15 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 57 5 days ago