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.

Forms & Blueprints

Remove default dropdown option for the content creation modal

Started by julien 8 years ago · 1 replies · 604 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 Ton Haarmans, 5 years ago
13 1135 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 108 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 128 7 months ago