[opencms-dev] copy a Resource and its siblings as a new Resource

Peter korn peterkorn at gmx.net
Wed Oct 4 13:27:26 CEST 2006


Hi,

thanks again. It worked to import a manipulated importfile. There was only one problem. When importing the files should be deleted in OpenCms, otherwise OpenCms dosent care about the uuidresource in the manifest and uses the old ids again.
If someone has the same task it may help to know that.

greetings 

Peter


-------------------------------------------
> > Hi,
> > thanks for your reply. 
> > 
> > Yes you understand this correctly. I think i will do it like you suggested  i just hoped there where an easyer way to do it, like changing the uuidresource in the manifest > of an OpenCms Export.

Well - you could to that as well, if this fits your needs. Do a complete database dump first (if sth goes wrong) and then

- export *only* those resources that should be cloned
- manipulate all destination paths in manifest.xml so that the resources will be imported to different VFS paths
- manipulate all UUIDs in manifest.xml: for each existing UUID, create a new UUID instead. (Class CmsUUID might help with that)
  If one UUID is used in more than one place, then replace all occurrences with an *identical* UUID that you have generated

You have to be very careful that you assign the new UUIDs in a clean manner, as described above. 
Basically, any two resources that have the same UUID will be made into siblings. 
The resource that is imported last will determine the resource type and overwrite the shared content block.


hth
christian
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066


_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://lists.opencms.org/mailman/listinfo/opencms-dev


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



More information about the opencms-dev mailing list