내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Copy page - Override AEM 6.5

Avatar

Level 4

I am trying to copy pages on the sites page using the copy option on the action bar - But whenever i try to copy the page it creates a new page if the page is existing - I am trying to come up with an ability to overwrite the file if it is existing and create a new one if the file is missing more.

 

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor
6 답변 개

Avatar

Community Advisor

HI @AEMnewbie 

AEM does not check for content while copying/moving the page. It just considers the name i.e. node name/page name.
Existing functionality itself checks if the node you are trying to copy already exists it will add 1,2,3, so on with the existing node name and add the copy.
If the page does not exist then it will copy the page as is. This is the OOTB functionality.

 

Thanks!

Avatar

Level 4

@Asutosh_Jena_ Yes ! I get that i am trying to override that OOTB functionality such that it overrides the existing node ( Like update the existing node or delete and create a new one ) - When the copy already exists

/wcm/core/content/sites/jcr:content/actions/selection/copypage - I was referring to this path and see if any property addition here would prevent it from creating new nodes with number 1,2,3 - Then i tried looking at /libs/granite/ui/components/coral/foundation/collection/action - I noticed some actions in there like ignoreRel (Boolean) - tried adding this property in here /wcm/core/content/sites/jcr:content/actions/selection/copypage to see if that would make any difference it didnt -- I do see action and actionConfigName property in there but i wasnt sure where exactly i could find and code/reference related to those ..

 

or If you could point me to the location where i could find that OOTB code that could be helpful too

Avatar

정확한 답변 작성자:
Community Advisor

Avatar

Level 4
Thanks @Bhuwan_B ..That post is really helpful

Avatar

Community Advisor

Glad to hear that. Thanks !

Avatar

Level 4
@Bhuwan_B @arunpatidar -- I followed the above link and went ahead and created a overlay for this /libs/cq/gui/components/common/wcm/clientlibs/wcm/js/copy.js under apps .. I have the custom implementation for the copy logic ..But i noticed an issue while testing -- The edit option doesnt work after this change .. How could i make it work ? (FYI -- THe edit works when i copy the open.js too into apps ) - But i wanted to just overlay the copy and leave the rest under libs