-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making content type the default for a list #775
Comments
@dgtheninja : we did not yet implement this, but it's a good one to implement. The PnP Framework method you're referring to shows how this is done: the first content type in the |
@dgtheninja : started working on this. |
@dgtheninja : support for changing the content type order has been added, the content type you set as first is also known as the "default" content type. Docs are updated as well, see https://pnp.github.io/pnpcore/using-the-sdk/contenttypes-intro.html#getting-and-setting-the-content-type-order-in-the-list-new-menu. Can you please give things a go and provide feedback. These updates will appear in the next nightly build (= version 1.5.85 or higher) |
@jansenbe, again thanks for the swift implemention it does exactly what I need. One small point, shouldn't the return value from the GetContentTypeOrder methods and the parameter to the ReorderContentTypes methods be IEnumerable rather than List? |
Think in this case returning a |
I am converting a project on .Net 4.7 that used the old SharePointPnPCoreOnline nuget package to a new .Net Core 6 project using the Pnp.Core and PnP.Framework packages and have come up with an issue converting a piece of functionality
When adding an exisiting content type to a list we were able to make the content type the default one for the list with the 2nd property on the following
spList.AddContentTypeToListByName("contentTypeName", true);
In the new world I can add the content type, with the below but there seems to be no option to make it the default
await spList.ContentTypes.AddAvailableContentTypeAsync(siteCT.Id);
Can anyone advise on how to perform this with the new packages?
The text was updated successfully, but these errors were encountered: