We have a require to do some operations on the copied component. So for that we have written a listener(aftercopy event).
Using aftercopy property after copying and pasting the component we are able to capture only the source component path only and not the copied component path. Can you please help us how to get the copied component path.
Attached below sample code snippet we are using:
Property added under cq:listeners node in cq:editconfig
aftercopy - function () {Granite.author.Myproject.aftercopy(this);}
(function (ns) {
'use strict';
ns.Myproject= ns.demo2 || {};
ns.Myproject.aftercopy = function (component) {
alert(component.path); //This always giving the source component path, how to get the copied component path here?
};
}(Granite.author));
Your help is highly appreciated. Thank you