Expand my Community achievements bar.

How to distinguish creation or copy of a page??

Avatar

Level 2

I am using event handler to detect page creation. But i have to now distinguish the page creation between the "create" option and "copy" of a page. In both the cases the modification type is "pageCreated", so how to differentiate the two.

Many Thanks for any solutions and guidance.

2 Replies

Avatar

Level 2

Hi , I doubt its possible. As in AEM,page creation and page copy are considered  the same .Even in var/audit the cq:type value PageCreated for both create and copy action.

Avatar

Level 2

When looking at page events, you won't be able to tell if it is copied or created. What you might be able to do is check the content on the page. If it has certain criteria, like it has X components inside the parsys that are not standard on the template, or if X components are configured, you can tell that the page is a copy of another page.