Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

First time vs next time publish

Avatar

Avatar
Validate 1
Level 1
Riyaz_Ahmed_Moh
Level 1

Likes

3 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile

Avatar
Validate 1
Level 1
Riyaz_Ahmed_Moh
Level 1

Likes

3 likes

Total Posts

12 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Boost 3
Boost 1
Affirm 1
View profile
Riyaz_Ahmed_Moh
Level 1

10-02-2021

Hi

I need to invoke functionality based on the page publish in author environment.

How AEM knows, if a page publishing is a new page or republishing an existing page? I need to check this in my code and invoke different functionalities.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct Reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Give Back
Level 4
Sanket_Kumbharkhane
Level 4

Likes

46 likes

Total Posts

50 posts

Correct Reply

20 solutions
Top badges earned
Give Back
Boost 5
Boost 3
Boost 25
Boost 10
View profile
Sanket_Kumbharkhane
Level 4

10-02-2021

Hi @Riyaz_Ahmed_Moh ,

 

you can identify this base on page replication properties like cq:lastReplicated, cq:lastReplicatedBy or cq:lastReplicatedBy.

when the page is unpublished or never published, these properties will be missing from /content/pagepath/jcr:content.

and As soon as the author publishes the page, these properties get added automatically by the system to jcr node.

 

Thus, you can write a validation code around these properties to identify the fresh pages or existing published pages.

 

you can also use  "jcr:created" property of the page to identify page age comparing to the current timestamp & filter out new or existing pages base on your requirement. cq:lastModified can use to check the last activity on the page.

 

Screenshot 2021-02-10 at 5.08.22 PM.png

Answers (0)