We are currently required to show the window.digitalData.createDate as the date that the AEM page is created.
When I am running ${currentPage.createDate} from sightly, I get the creationDate from the publisher. which is the wrong date (this is the create date of when the node have been replicated).
What I really need is the createDate from the author.
How can we get the actual createDate of a page in the publisher with the author's details?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
OOTB the property jcr:created will contain the information when the first time the page was created on the publisher instance. So, definately it will be different from the jcr:created field present on the author environment.
Steps you can follow for achieving your use case:
1. Create a Replication Listener with the path restriction that it processes further if you are under the specific hierarchy, otherwise skip.
Reference: https://helpx.adobe.com/in/experience-manager/kb/ReplicationListener.html
2. Update a custom property "custom_property" at the page with the value that is present in the field "jcr:created"
3. In your logic update the code to read the "custom_property", instead of "jcr:created".
Thanks
Hi @AEMWizard ,
Have you tried this?
${pageProperties['jcr:created'].time.toString}
Note: Replicated page and checked on publisher - which will be of course replicated date and time on publisher which turn into jcr:created
To answer your question- there is no OOTB functionality which fetches details from author on publish instance, It has to be customized!
Hope that helps!
Regards,
Santosh
Hi,
You should be using a dedicated field for capturing data layer data and do not rely on AEMs internal properties.
Hi,
OOTB the property jcr:created will contain the information when the first time the page was created on the publisher instance. So, definately it will be different from the jcr:created field present on the author environment.
Steps you can follow for achieving your use case:
1. Create a Replication Listener with the path restriction that it processes further if you are under the specific hierarchy, otherwise skip.
Reference: https://helpx.adobe.com/in/experience-manager/kb/ReplicationListener.html
2. Update a custom property "custom_property" at the page with the value that is present in the field "jcr:created"
3. In your logic update the code to read the "custom_property", instead of "jcr:created".
Thanks
Views
Likes
Replies
Views
Likes
Replies