How I can move the document types contact, frontpage, ... to main:google,meta? All Document Types have Tags... unfortunately the same Tags such as main:google, meta and i don't want lose them!
I guess you could use "Copy", which may not be ideal. But I think that is the best option.
there are two things you should pay attention to when using copy.
1: You must delete the document types manually when they have been copied
2: All inherited sections must be deleted in the "Tabs" section manually, since there is a little bug when copying document types, that inherits from at master document type. Then the inherited properties are actually being placed on the copied document type.
I am thinking that it's probably also possible to move things around directly in the database. But I have no experience in with that so I can't guide you on that. Maybe someone else can.
Hope that it all makes sense and do remember to make a backup before you start moving things around.
One option is to edit database table 'cmsContentType' and update masterContentType column to move to different document types. This is to change Master Document Type.
I'd like to do the same, tried to update the masterContentType column, but if you're going to edit the content of that content-type, you'll get a NullReferenceException:
[NullReferenceException: Object reference not set to an instance of an object.] umbraco.controls.ContentControl.addControlNew(Property p, TabPage tp, String Caption) +106 umbraco.controls.ContentControl..ctor(Content c, publishModes CanPublish, String Id) +1057 umbraco.cms.presentation.editContent.OnInit(EventArgs e) +404 System.Web.UI.Control.InitRecursive(Control namingContainer) +142 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1476
I'm pretty sure my last blogpost will fix that issue. Haven't tested it, but it's related to the problem you are having. It's also not a solution, just a workaround.
@Bram: The exported files are plain XML - If I'm not mistaken, you can specify the Master template in there - so if you export a type and edit the file, putting a <Master> element inside the existing <Info> element, you may be able to import it... (?)
You can move a document type by updating the DB manually, but it's very easy to screw things up this way !! so only attempt if you know what you're doing!!
And definitely backup the DB beforehand!!
Here's the sql to move NewsItem (ID 1077) to NewsGroup (ID 1148), so that NewsItem is a child of NewsGroup:
update umbracoNode set parentid = 1148, level = 2, path = '-1,1148,1077',sortorder=0 where id = 1077
Change sortorder to a higher number if there are existing child types in the target parent.
This might be a bit late, but could be helpful for anyone else has the same problem.
If you want to change parent for a document type, you need to export the document type and open it in a text editor(notepad) and add a simple tag inside the info Tag and save and import it again.
You need to add this tag <Master>YOUR PARENT DOCTYPE NAME</Master>
Is it possible to reimport xml without deleting previous version from settings? Because I have a lot of content pages created and do not want to lose thir reference to document type.
Do I need to change only master? Because in my case I see composite tag also referencing to parent.
Database solution (update umbracoNode set parentid = 1148, level = 2, path = '-1,1148,1077',sortorder=0 where id = 1077)- doesn't work. Yes it moves child node under another root note. But leaves all inherited properties from old parent. Which is not desired effect as you will have mix from both versions of hierarchy.
How to move the document types
Hello everbody, i need your help!
I have a lot of document types. Here is an example:
- contact
- frontpage
- textpage
- main:google,meta
+ Login
+ Statement
- ...
- ...
(the + are childs from the main!)
How I can move the document types contact, frontpage, ... to main:google,meta? All Document Types have Tags... unfortunately the same Tags such as main:google, meta and i don't want lose them!
Thanks for your help :-).
You can just move a document, right mouse > move and select the new parent. Of if you've got many documents to move, use the api:
"move a document, right mouse > move and select the new parent" this function does not exist
Hi Calvin
I guess you could use "Copy", which may not be ideal. But I think that is the best option.
there are two things you should pay attention to when using copy.
1: You must delete the document types manually when they have been copied
2: All inherited sections must be deleted in the "Tabs" section manually, since there is a little bug when copying document types, that inherits from at master document type. Then the inherited properties are actually being placed on the copied document type.
I am thinking that it's probably also possible to move things around directly in the database. But I have no experience in with that so I can't guide you on that. Maybe someone else can.
Hope that it all makes sense and do remember to make a backup before you start moving things around.
/Jan
In the content section, select a node in the tree, right click on the node and select 'move', select new parent.
Hi Folkert
I think Calvin is trying to move the document types around in the settings section. Not in the content section :)
/Jan
One option is to edit database table 'cmsContentType' and update masterContentType column to move to different document types. This is to change Master Document Type.
Yes i am trying to move the document types around in the settings section :-).
Thanks Jan for your post, i try it tomorrow and going to write a feedback ;-).
Calvin
I'd like to do the same, tried to update the masterContentType column, but if you're going to edit the content of that content-type, you'll get a NullReferenceException:
Hi,
I'm pretty sure my last blogpost will fix that issue. Haven't tested it, but it's related to the problem you are having. It's also not a solution, just a workaround.
Cheers,
Richard
depending on the amount of Document Types, Exporting en Importing them again would be an option
sorry, looks like it's not possible to select the Master Document Type when you import a Document Type
@Bram: The exported files are plain XML - If I'm not mistaken, you can specify the Master template in there - so if you export a type and edit the file, putting a <Master> element inside the existing <Info> element, you may be able to import it... (?)
/Chriztian
You can move a document type by updating the DB manually, but it's very easy to screw things up this way !! so only attempt if you know what you're doing!!
And definitely backup the DB beforehand!!
Here's the sql to move NewsItem (ID 1077) to NewsGroup (ID 1148), so that NewsItem is a child of NewsGroup:
update umbracoNode set parentid = 1148, level = 2, path = '-1,1148,1077',sortorder=0 where id = 1077
Change sortorder to a higher number if there are existing child types in the target parent.
This might be a bit late, but could be helpful for anyone else has the same problem.
If you want to change parent for a document type, you need to export the document type and open it in a text editor(notepad) and add a simple tag inside the info Tag and save and import it again.
You need to add this tag <Master>YOUR PARENT DOCTYPE NAME</Master>
i.e
<?xml version="1.0" encoding="utf-8"?>
<DocumentType>
<Info>
<Name>...............</Name>
<Alias>..............</Alias>
<Icon>settingCss.gif</Icon>
<Thumbnail>folder.png</Thumbnail>
<Description></Description>
<AllowAtRoot>False</AllowAtRoot>
<Master>YOUR PARENT DOCTYPE NAME</Master>
<AllowedTemplates>
<Template>.............</Template>
</AllowedTemplates>
<DefaultTemplate>...............</DefaultTemplate>
</Info>
.......
Hello,
is working on a reply...