Skip to content
● Critical PHP security fixes are out: update PHP on your Grav sites. What to do →

Remove default dropdown option for the content creation modal

Started by julien 8 years ago · 1 replies · 908 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 TomW, 2 days ago
3 74 2 days ago
Forms & Blueprints · by Japhy, 3 weeks ago
2 392 2 weeks ago
Forms & Blueprints · by FrViPofm, 1 month ago
5 394 1 month ago
Forms & Blueprints · by Ton Haarmans, 6 years ago
13 2385 8 months ago
Forms & Blueprints · by Hugo Oliveira, 9 months ago
0 841 9 months ago