Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jannik Nilsson 38 posts 81 karma points
    Aug 20, 2009 @ 12:00
    Jannik Nilsson

    Change Master Document Type after creation

    Is it possible to set the Master Document Type of a Document Type after creation?

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 20, 2009 @ 12:10
    Thomas Höhler

    Only in the database: in tha table cmsContentType you can edit the column MasterContentType


  • Thomas Höhler 1237 posts 1709 karma points MVP
    Aug 20, 2009 @ 12:11
    Thomas Höhler

    Forgot to say: You put in the nodeId from the ContentType you want as master

  • dandrayne 1138 posts 2262 karma points
    Aug 20, 2009 @ 12:11

    I dont think so, no.  It's important to "map out" (either mentally or whatever) the structure and data types needed for a site running umbraco, as this can't really be changed.

    I'm ready to be corrected though, it would have helped on a few occasions!


  • Johan Roug 97 posts 153 karma points
    Sep 01, 2009 @ 23:33
    Johan Roug

    A smart way to change the default documenttmaster is to rightclick on the node in the contenttree, fx (blog), and choose "copy". THen choose the new location, and choose a documentmaster.

    Afterwards you might need to do some trimming, but I have found this the only way to solve the problem.. and yes I have tried with "block for umbraco", and it works perfectly after this operation :)

  • Rob Watkins 346 posts 607 karma points
    Dec 19, 2017 @ 10:42
    Rob Watkins

    Wow, 8 years later, Umbraco 7.7 and this tip STILL works and has saved me having to recreate a billion properties, thanks from the future Johan :)

  • Rik Helsen 670 posts 873 karma points
    Oct 12, 2011 @ 11:55
    Rik Helsen

    Awesome tip Johan!

  • Dan Diplo 1554 posts 6203 karma points MVP 4x c-trib
    Oct 12, 2011 @ 14:09
    Dan Diplo

    The best solution, of course, would be if Umbraco actually allowed you to change the Master DocType via the existing interface. I've raised this as a feature request on Codeplex - it's the highest voted issue that still hasn't been resolved. Please vote for it if you want a change.

  • ravindranathw 14 posts 50 karma points
    Sep 26, 2013 @ 12:42

    Better way would be backup the data in the content area and then export the documentType to UTD file. Then Delete the documentType import it back by right clicking root documentType. When importing select master document type.

  • ravindranathw 14 posts 50 karma points
    Sep 26, 2013 @ 12:43

    Oh forgot to tell. Change the MasterDocumentType in xml file(utd) you can do this by editing using a txt file

  • Carlos Casalicchio 165 posts 674 karma points
    Jan 13, 2014 @ 13:05
    Carlos Casalicchio

    For umbraco 6+ I've used the following sql query to change the Parent Document Type

    UPDATE umbracoNode SET parentID = <<parent id>> WHERE id = <<id>>

    There's no way to change the Parent Document Type in the Umbraco Dashboard, only via SQL (use it at your own risk!)

  • Thomas Egebrand Gram 63 posts 137 karma points
    Jan 22, 2014 @ 16:01
    Thomas Egebrand Gram

    Carlos' solution did the trick for Umbraco 6. Thank you very much! :-)

    // Thomas 

  • David Court 6 posts 26 karma points
    Feb 25, 2014 @ 12:02
    David Court

    Couldn't get any of the above solutions to work on umbraco 6.1.6 but this did:

    UPDATE umbracoNode SET parentID = {Parent ID} WHERE id = {Content Type ID}

    UPDATE cmsContentType2ContentType SET parentContentTypeId = {Parent ID} WHERE childContentTypeId = {Content Type ID}

    However it seems to cause an issue with adding custom tabs (i.e. it doesn't), any further solutions to that anyone?

  • Davey Bonamie 5 posts 26 karma points
    Mar 24, 2014 @ 10:18
    Davey Bonamie

    I have used this query to put document types without a master under another master document type. It was build up by posts of other topics here.

    USE WebsiteDB;  -- Set with your DB name

    DECLARE @ContentTypeId INT, @NewParentId INT;
    SET @ContentTypeId = 1058;  -- set with ID of ContentType to change
    SET @NewParentId = 3114;    -- set with ID of new parent to set to @ContentTypeId

    -- Set new ParentID
    UPDATE [cmsContentType2ContentType]
    SET [parentContentTypeId] = @NewParentId
    WHERE [childContentTypeId] = @ContentTypeId;

    -- Remove GroupID from properties that are in inherits groups
    UPDATE cmsPropertyType
    SET propertyTypeGroupId = NULL
    FROM cmsPropertyType
        INNER JOIN cmsPropertyTypeGroup ON cmsPropertyType.propertyTypeGroupId =
    WHERE (cmsPropertyType.contentTypeId = @ContentTypeId) AND (cmsPropertyTypeGroup.parentGroupId IS NOT NULL);

    -- Remove inherits groups
    FROM cmsPropertyTypeGroup TB1
    WHERE (TB1.contenttypeNodeId = @ContentTypeId) AND (TB1.parentGroupId IS NOT NULL);

    -- Reading path info
    DECLARE @NewParentPath VARCHAR(100);
    SELECT @NewParentPath = [path] FROM umbracoNode WHERE id = @NewParentId;

    -- Update Path field
    UPDATE umbracoNode
    SET parentId = @NewParentId
        , [path] = @NewParentPath + ',' + CAST(id AS VARCHAR(20))
    WHERE id = @ContentTypeId;

    Insert into cmsContentType2ContentType Values(@NewParentId,@ContentTypeId)


    Afterwards I do a IIS restart and it's working fine.


  • David Court 6 posts 26 karma points
    Apr 01, 2014 @ 16:08
    David Court

    Thanks for sharing, I'll try that out

  • Matt Taylor 870 posts 2083 karma points
    Jan 22, 2015 @ 15:43
    Matt Taylor

    The scripts appears to work OK in Umbraco 7 too.

Please Sign in or register to post replies

Write your reply to: