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.

General

Quick Tray link for new page

admin

Started by Robert 7 years ago · 3 replies · 761 views
7 years ago

I would like to add a quick link in the admin panel to create a new page.

It is possible to go to all pages by configuring /admin/pages. Has anyone found the link to directly create a new empty page or show the modal popup?

(/admin/pages#modal is not working)

7 years ago

Hi @metbril, one technique to do something like this is creating a custom Admin Panel dialog and Button Bar item - docs are https://learn.getgrav.org/cookbook/admin-recipes#add-a-custom-page-creation-modal

And here is a little video demo:
https://twitter.com/hibbittsdesign/status/954109982005317632

I've done this in my Open Course Hub Skeleton too, if you want to explore a working example:
https://github.com/hibbitts-design/grav-skeleton-course-hub/tree/master/blueprints/admin/pages
https://github.com/hibbitts-design/grav-skeleton-course-hub/tree/master/blueprints/admin/pages

Hope the above helps.
Paul

last edited 01/02/19 by Paul Hibbitts
7 years ago

I have tried adding the custom modal, and that works fine. Nice tip.

However, this does not solve my problem. The custom form still is a modal dialog, without it's own url in the admin panel. This is needed to be able to directly add is to the Quick Tray.

Or have I perhaps misinterpreted your suggestion?

7 years ago

Oh, this was a suggested alternative 🙂You likely can do what you are looking for with a Custom Plugin if the above is not close enough - perhaps someone more dev-oriented might share their thoughts here?

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 85 13 hours ago
General · by pamtbaau, 18 hours ago
1 60 17 hours ago
General · by Andy Miller, 1 day ago
0 47 1 day ago
General · by Marcel, 12 months ago
6 350 5 days ago
General · by Duc , 6 days ago
3 44 5 days ago