Posts tagged as:

cross repository copy

Recently I have been asked a few times for an example of how to copy content from the DM Alfresco repository into the AVM (WCM) repo, so I thought I would post a simple example using the JavaScript API to help people get started. It can be a little tricky getting the paths etc correct if you are new to Alfresco, so hopefully this will assist.

The 3.1 JavaSccript API wiki page shows the required parameters:

ScriptNode copy(ScriptNode source, ScriptNode destination, String name)

Download the example web script here.  This web script is based on some example code taken from the Alfresco Forge project – FlexSpaces which contains some great examples of WCM web scripts.

[click to continue…]