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 →

Remove default dropdown option for the content creation modal

Started by julien 8 years ago · 1 replies · 1005 views
8 years ago

Hi everyone,

I successfully added 2 custom creation modal with the link in the "Add +" drop down.
Which is a really neat feature in Grav.

But I was wondering if there was a way to remove the default "Add Page" and "Add Modula" option from the drop-down.
I'm sure there is a hardcoded way of doing it. But I would prefer know the proper way.

8 years ago

Never tried, but as the plugin display the dropdown by picking the blueprint located in user/plugins/admin/blueprints/admin/pages I guess you could overwrite these blueprints by creating some empty file named

modular_new.yaml
new.yaml

and place these files inside
user/blueprints/admin/pages/

If this does not work, you might have to copy paste the content of the first folder, and use unset@ or similar.

Let me know how it works!

Edit: at second look, it looks like these are hardcoded in pages.html.twig ...

last edited 09/20/18 by Paul Massendari

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Anna, 2 days ago
2 51 15 hours ago
Forms & Blueprints · by Anna, 3 days ago
7 81 15 hours ago
Forms & Blueprints · by Anna, 1 week ago
5 185 6 days ago
Forms & Blueprints · by TomW, 1 month ago
3 377 1 month ago
Forms & Blueprints · by Japhy, 2 months ago
2 593 2 months ago