I'm looking to override the copy function. To do this I want to cancel the original copy in the Document.BeforeCopy event of my application base. But actually I do not see in the CopyEventsArg a property that tells if the user has checked the "Relate copied items to original"... Should be a nice property for a next version :-)
Thank you, I already read that post. But my problems with the actual copy, is that it doesn't maintain links between objects that are copied. So now I want to be able to copy documents and maintain the full structure of what i am copying. The most easy way is to cancel the umbraco copy and make the copy myself, and find out what is related to what (not with relations) but with properties linked to other content. For now i have a site, and when i'm copying it to 3 languages and 6 other languages, i have to redo all the links of my documents. This can be ok for one time ! But I have a project coming with more the 35 sites to be copied and i really doesn't want to go through that hell :-) I could make something quick and dirty, but as we are building a framework around all the new features we have for our new sites, i'm trying to make things as most reusable possible.
So if a user makes a copy, and start the normal action of the copy through the CMS, I don't see why I can not see if he selected the "Related to original document". If i can not find out , I have to go through the original copy and maintain a list of what is copied, and update everything ! BUT this is not optimal at all :-)
Before Copy and "Relate copied items to original"
I'm looking to override the copy function. To do this I want to cancel the original copy in the Document.BeforeCopy event of my application base. But actually I do not see in the CopyEventsArg a property that tells if the user has checked the "Relate copied items to original"... Should be a nice property for a next version :-)
Hi Laurent
Perhaps you can find some hints related to the relations API that could be of use in this post? http://blog.hendyracher.co.uk/umbraco-relation-api/
/Jan
Thank you, I already read that post. But my problems with the actual copy, is that it doesn't maintain links between objects that are copied. So now I want to be able to copy documents and maintain the full structure of what i am copying. The most easy way is to cancel the umbraco copy and make the copy myself, and find out what is related to what (not with relations) but with properties linked to other content. For now i have a site, and when i'm copying it to 3 languages and 6 other languages, i have to redo all the links of my documents. This can be ok for one time ! But I have a project coming with more the 35 sites to be copied and i really doesn't want to go through that hell :-) I could make something quick and dirty, but as we are building a framework around all the new features we have for our new sites, i'm trying to make things as most reusable possible.
So if a user makes a copy, and start the normal action of the copy through the CMS, I don't see why I can not see if he selected the "Related to original document". If i can not find out , I have to go through the original copy and maintain a list of what is copied, and update everything ! BUT this is not optimal at all :-)
Any way your link is interesting :-)
is working on a reply...