


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
Views
Replies
Sign in to like this content
Total Likes
Hi,
The aftercopy listener in the provided code snippet is only able to capture the source component path and not the copied component path. The requester needs help in getting the copied component path.
Hi,
The aftercopy listener in the provided code snippet is only able to capture the source component path and not the copied component path. The requester needs help in getting the copied component path.