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

SOLVED

Fetch jcr:created from cq:page

tushaar_srivastava
Level 4
Level 4

Hi,

We need to fetch the jcr:created date for cq:Page (TestTouchRTE).

tushaars9735484_0-1580450674589.png

I am using 

<c:set var="createdDate" value="${pageProperties['jcr:created']}"/>

This is giving jcr:content created date i.e. of cq:PageContent

tushaars9735484_0-1580469557242.png

 

, instead I want the jcr:created date of cq:Page.

 

Thanks

 

 

@kautuk_sahni @Arun_Patidar 

1 Accepted Solution
Jörg_Hoh
Correct answer by
Employee
Employee

Actually it should not make any difference, and I wonder how in your case the timestamps can be different at all.

 

But the Page API does not provide any way to read that (I see a "getLastModified()" method, but no "getCreated()" method, which is a bit inconsistent), therefor I would stick with the method you already have. As said, I cannot explain the inconsistency, but this property is not protected, and thus can be changed at will.

View solution in original post

1 Reply
Jörg_Hoh
Correct answer by
Employee
Employee

Actually it should not make any difference, and I wonder how in your case the timestamps can be different at all.

 

But the Page API does not provide any way to read that (I see a "getLastModified()" method, but no "getCreated()" method, which is a bit inconsistent), therefor I would stick with the method you already have. As said, I cannot explain the inconsistency, but this property is not protected, and thus can be changed at will.

View solution in original post