AEM move page event | Community
Skip to main content
svitlanab794551
Level 2
September 26, 2017

AEM move page event

  • September 26, 2017
  • 2 replies
  • 3138 views

Hi,

I am searching how to correctly handle Move (Rename) page event in AEM 6.3.
In my particular case - if page is moved, I need to move appropriate DAM folder accordingly new page path. So I definitely need to know source and target page path.

I know that it is possible with JCR Listeners, but as it is not recommended low level approach with long living session I would like to avoid it.
Sling Handlers will divide this event to 2 independent events  - remove and add, that is not good cause here I don't know source and target.

Maybe there is another appropriate way to do it?

Thanks.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

kautuk_sahni
Community Manager
Community Manager
September 26, 2017

AFAIK, if you move DAM folder or Web page then all the references and will be automatically adjusted and republished.

Can you please help me understand what exactly is your use case?

~kautuk

Kautuk Sahni
svitlanab794551
Level 2
September 26, 2017

Hey kautuksahi,
in our case we dynamically create DAM folders for every page, like:
/content/dam/<pagePath>/componentA/<images>
And then we dynamically extract Image under specific DAM folder on specific page and show image in ComponentA for example.
It is done via code so no direct references in Page Properties present, but with this approach we save a lot of Content Editors time

VeenaVikraman
Community Advisor
Community Advisor
September 26, 2017

Why do you need to do this if you already have your images in your DAM. ? I am pretty confused here

Level 3
September 7, 2022

Hi svitlanab794551

Which solution did you find? I have a very similar problem. I have noticed that a listener receives among others a list containing a pair of events after a page has been moved - one of type ADDED and the second one of type REMOVED. This pair of events contains the source and target paths. All other events are received as separate events by the listener according to my tests and only this one pair is received as a pair and not as separate events. I wonder if anyone else solved this problem and can confirm that a listener will receive always such a pair of events in one list only in case of a moved page.