Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Copy and replace a document View modes: 
User avatar
Member
Member
Aon_Vlado - 7/28/2012 7:12:42 PM
   
Copy and replace a document
There is a way how to copy a tree document (page) to a different site (right click on tree node and choose copy). However if a document with the same name already exists in target site the copy process creates a new document with a number in the name instead of asking if to replace it or create a new one. I would need it to be able mass change of certain pages across all my sites.

What would be the best approach to custom code this functionality?

Thanks,

Vlado

User avatar
Kentico Support
Kentico Support
kentico_radekm2 - 7/30/2012 3:33:59 AM
   
RE:Copy and replace a document
Hello.

For such a task, I would recommend you using our API for managing documents and perform this operations in code. You can see code examples for all documents-related operations at http://devnet.kentico.com/docs/5_5R2/devguide/content_management_internals.htm.

If you want to execute custom actions when a document (TreeNode) is created, updated or deleted, you could take an advantage of the TreeNode handler class: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?treenode_handler.htm

Best Regards,
Radek Macalik