I wish to move a document type from the current level in the tree, down one level.
My document type "Gallery" is currently sitting at:
BaseDocumentType > BaseWebpage
I wish to move it so it's parent is now StandardContent
BaseDocumentType > BaseWebpage > StandardContent
The problem is I have to do this on more than one server. I make the change on a local server, but then deploy to Staging and then to pre-prod after that.
I am using uSync to control doctypes. Currently my method to get this to work is to export the Gallery doctype, delete the old doctype, edit the export file so that it contains the correct parent, then import the doctype into Umbraco again.
However in the end this still Deletes the doctype in local, and a usync file is created that shows this. this means my content associated with this doctype is also deleted when I deploy this change to staging!
Is there a nice hack you can use to trick uSync into simply moving a doctype?
2) Edit the udf export file so that it contains the correct parent
3) Rename the old doctype to something e.g. Gallery2
4) Import the new doctype (udf) into Umbraco.
5) Go into the parent doctype of the content you are trying to keep, and make sure the new doctype is associated as a permission. It should now have Gallery2 and Gallery as page types
6) Right click the node and Change document type, it should change from Gallery2 to Gallery
Good news from Umbraco 8 - this feature is fully achievable through uSync. Just export, edit some xml and import. Your doctype will be edited, without any changes in content.
To change parent, you should edit these parts of Info section
Move a document type down one level
Good morning,
I wish to move a document type from the current level in the tree, down one level.
My document type "Gallery" is currently sitting at:
BaseDocumentType > BaseWebpage
I wish to move it so it's parent is now StandardContent
BaseDocumentType > BaseWebpage > StandardContent
The problem is I have to do this on more than one server. I make the change on a local server, but then deploy to Staging and then to pre-prod after that.
I am using uSync to control doctypes. Currently my method to get this to work is to export the Gallery doctype, delete the old doctype, edit the export file so that it contains the correct parent, then import the doctype into Umbraco again. However in the end this still Deletes the doctype in local, and a usync file is created that shows this. this means my content associated with this doctype is also deleted when I deploy this change to staging!
Is there a nice hack you can use to trick uSync into simply moving a doctype?
Andrew
You could make a SQL query that changes the parent of the "Gallery" document type.
EDIT: You need to remove the relation aswell:
It definitely moved the document type, but none of the inherited fields are in it.
So I guess I'm back to square one
That is one of reasons I don't use inheritance in umbraco ducument types, there is no easy way to change an inheritance hierarchy.
Consider interface orientied approach with document types in future, it much more flexible.
I think, Joeps advise would solve your problem as it is, please tell us if it does
Okay I got it to work:
1) Export the Gallery doctype
2) Edit the udf export file so that it contains the correct parent
3) Rename the old doctype to something e.g. Gallery2
4) Import the new doctype (udf) into Umbraco.
5) Go into the parent doctype of the content you are trying to keep, and make sure the new doctype is associated as a permission. It should now have Gallery2 and Gallery as page types
6) Right click the node and Change document type, it should change from Gallery2 to Gallery
7) Commit & deploy to staging
8) Do a uSync
Magic, your content is still there!
9) Clean up - delete Gallery2
Hi everyone
Good news from Umbraco 8 - this feature is fully achievable through uSync. Just export, edit some xml and import. Your doctype will be edited, without any changes in content.
To change parent, you should edit these parts of Info section
is working on a reply...