[Note: most of this post discusses document libraries, but the concepts and code are similarly applicable to other types of lists.]
The default "New" menu item in a document library has just 2 items: document and folder.
Changing these options in the UI is relatively easy, after enabling the management of content types and adding a number of content types to the document library these automatically appear in the menu.
The document library settings even allow you to change order of the content types and hide content types from the New menu. ( Shared Documents > Settings > Change New Button Order )
The next step is managing these settings from code, so you can easily change the settings in multiple document libraries. Investigating the SPList class you notice the ContentTypes property, this method returns a collection of supported content types for a list. Deleting a content type from this list, removes the support for that content type from the document library. This will throw an exception when the content type is still in use by items in the list.
// open the library
SPList lib = GetDocumentLibrary();
SPContentTypeCollection contentTypes = lib.ContentTypes;
SPContentType contentType = contentTypes[ /* content type name */ ];
if (contentType == null) {
// content type not found
return;
}
// delete the contentype
contentType.Delete();
lib.Update();
Adding a content type is similar:
contentTypes.Add( new SPContentType( /* */ ) )
Changing the order of and hiding content types is less simple. The SPContentType class has a Hidden property, but this property does not appear to have an effect on the content type. But there is another place in an SPList where content types are managed, the RootFolder property has 2 properties: ContentTypeOrder and UniqueContentTypeOrder. The ContentTypeOrder property contains all the content types supported by this list and return the content types from the parent when the list has not specified unique content types. The UniqueContentTypeOrder is used to specify the unique content types for the new menu and their order.
// open the library
SPList lib = GetDocumentLibrary();
IList<SPContentType> currentOrder = list.RootFolder.ContentTypeOrder;
List<SPContentType> result = new List<SPContentType>();
foreach (SPContentType ct in currentOrder)
{
if (ct.Name.Contains("Document"))
{
result.Add(ct);
}
}
list.RootFolder.UniqueContentTypeOrder = result;
list.RootFolder.Update();
So managing the items in the new menu, is possible but it's not very straightforward.