Remove default dropdown option for the content creation modal


#1

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.


#2

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 …