8

How do you set "Allow management of content types?" to "Yes" within a Content Type or List Definition?

7

This can be done either by setting EnableContentType=true in the list definition or in the feature activation event we can set the attribute. Please refer the below links. They will definitely help you in solving your problem.

Enable managing content types by default at list creation

Creating SharePoint 2010 List Definitions in Visual Studio 2010

A Quicker Way to Create Custom SharePoint List Templates

  • Great help! Tank you! Best regards, Tim – Tim Aug 25 '11 at 7:43
6

This says to "toggle the SPList ContentTypesEnabled property from False to True".

Just toggle the SPList ContentTypesEnabled property from False to True. That enables the use of multiple content types on the list.

2

EnableContentTypes="TRUE" instead of EnableContentType="TRUE" (note the s)

1

Go to Library Settings>Advanced settings, then set Allow management of content types? to yes.

  • Would you please brief out your answer. One liner sometimes do not help future visitors. – Asad Refai Oct 5 '15 at 5:28
0

The way I do it is I set the ListCreationInfo and then create the list and enable ContentTypes:

ListCreationInformation creationInfo = new ListCreationInformation(); creationInfo.Title = ListManager.ListTitle; creationInfo.TemplateType = (int)ListtemplateType.Annoucements;

List list = web.Lists.Add(creationInfo); list.Description = ListManager.ListDescription; list.ContentTypesEnabled = true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.