Supress AdminMenu Content Type "New" Creatable Link

Topics: Writing modules
Apr 5, 2013 at 3:00 PM
I have a content type - Event.

This content type is Creatable, so an menu item is created under the "New" menu in the admin section.

I want to remove the "Event" menu item that is created in the "New" menu. I know what removing the Creatable setting would do this, but I don't want to remove the Creatable setting.

So is there anyway to do this through overriding the INavigationProvider? Or any other way?

Apr 6, 2013 at 1:46 AM
This is like saying "I want A, but I don't want A. How can I have A without A?" The creatable setting is what determines what goes under the New menu, no less, no more. Having it unchecked won't prevent you from creating items of that type from code.
Apr 8, 2013 at 9:58 AM
There's a lot more functionality that comes with setting a content type to Creatable.

Adding the Creatable setting also lists all the instances of that content type within the admin Manage Content section. I want to keep this functionality.

The problem I was having is that I want to link to my own Create controller action from the New admin menu item - as I have some extra validation to do when creating an instance of Event. It's very easy to create another New menu item which does this but the default content type New admin menu item still remains.

So there is no way to remove or change the link of the New admin menu item which is rendered by default?
Apr 10, 2013 at 12:35 PM
As you noticed, the "Creatable" setting is used to determine whether or not to render a link on the New section, as well as to determine whether or not the content type should be listed in the content filter dropdownlist.

You would have to modify the core code to introduce a new setting, one that controls whether or not content items of the type are Listable, separating this behavior from the Creatable option.