Portal Engine Questions on portal engine and web parts.
Version 4.x > Portal Engine > Change Document Type View modes: 
User avatar
Member
Member
Scott - 1/8/2010 10:56:37 PM
   
Change Document Type
Is it possible to change the document type of an existing document? The "easy" solution would be to just make a new document of the desired type, but there are several child documents and moving them is tedious.

User avatar
Kentico Developer
Kentico Developer
kentico_ondrejv - 1/10/2010 4:32:59 AM
   
RE:Change Document Type
Hello,

Actaully, once you create document of some document type, it is not possible to change its type after it is created. Therefore you might need to recreate particular document manually.

Optionally you could use our API and take every original document, create a new document of appropriate document type and then delete the original document. You can find some examples in our Developer's guide. Please find links to it below:

devnet.kentico.com/Docs/DevGuide22/creating_documents.htm
devnet.kentico.com/Docs/DevGuide22/delete_document.htm

Moreover in version 5.0 there is possibility to bulk moving documents (in the list mode within CMS Desk) with their child nodes. So upgrade would be solution as well.

Best regards
Ondrej Vasil

User avatar
Member
Member
Scott - 1/10/2010 8:51:13 PM
   
RE:Change Document Type
Thanks for the links. I may have to look into that.

Is there a way to restrict child document types other than the setting at the document type level?

I have some top level pages that are both of type "page menu item". Page 1 should only have child documents of type X and page 2 should only have child documents of type Y. Other "page menu item" documents should behave normally. Is there a way to do this without making new pages of some new document type, copying web parts, content, settings, etc. and then moving all existing child documents?

I think I know the answer already, but wanted to ask first.

Thanks,

Scott

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 1/14/2010 8:07:58 AM
   
RE:Change Document Type
Hi Scott,

Regrettably, it is not possible to easily implement this. You would need to ensure this in ~\CMSDesk\Content\new.aspx(.cs) page that is displayed when you are selecting document type when creating new document.

Best Regards,

Martin Dobsicek

User avatar
Member
Member
Alex Rybin - 1/11/2010 3:25:17 AM
   
RE:Change Document Type
I think it is possible with some low-level operations.
You should manually create record coupled table for new type of the document (see here: http://dev.kentico.com/docs/devguide/content_management_internals.htm), fill it properly. Then you should change "NodeClassId" field in the CMS_Tree table in the row of the document.

I highly recommend you make back up before you do it.