Installation and deployment Questions on installation, system configuration and deployment to the live server.
Version 6.x > Installation and deployment > Exporting/importing linked documents View modes: 
User avatar
Member
Member
yuriy.chabanov-gmail - 1/24/2014 11:21:02 AM
   
Exporting/importing linked documents
Hello,
I have 2 sites installed on one Kentico instance.
Second site has a lot of documents linked to the first site.
When I'm trying to export 2nd site and import the file as a new(3rd) site the linked documents are transformed to the non-linked. Hence, starting from this point, changes made in the original documents (1st site) will be available on the 2nd site but not the 3rd one, because the links are lost.

I clearly understand it was done to avoid cases when the original documents aren't available anymore(or the import performed on another Kentico instance, where the documents never existed), but ss there any cutom way to save document links during export-import? Or is there an API for that?
Thank you!

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 1/26/2014 4:19:36 AM
   
RE:Exporting/importing linked documents
Hi,

Thank you for your message.

It is like you said, the regular document is created from the linked one because otherwise the document could not exist in the imported instance.

When you create a linked document the link is created through the NodeLinkedNodeID column in CMS_Tree table. As you can see the NodeID is being linked and NodeID is an incremental column handled by the database. Taking this in account I dont think that its easily possible to alter the behaviour of import/export.

You could eventually manually put the value into the NodeLinkedNodeID yourself, but that would not be very efficient and not that easy to do.

Kind regards,
Richard Sustek