Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Forked from drift/UmbracoChangeDocTypeParent
Last active August 29, 2015 14:08
Show Gist options
  • Save csharpforevermore/533ceb244b134a643125 to your computer and use it in GitHub Desktop.
Save csharpforevermore/533ceb244b134a643125 to your computer and use it in GitHub Desktop.
Umbraco use of version 6's ContentTypeService
@using Umbraco.Core.Models;
@using Umbraco.Core.Services;
var contentTypeService = ApplicationContext.Current.Services.ContentTypeService;
var contentType = contentTypeService.GetContentType(4200);
contentType.ParentId=3130;
contentTypeService.Save(contentType);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment