Hi Team,
I want to get the last modification date of my site in one of the component. But the thing is let suppose there are 50 pages in my site and if I am making any kind of change in any of the pages. I want to get that modification date. Like I want to get the modification date for whole site. So where is this date is getting maitanined in aem ? Kindly help on this.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
AEM does not have an implicit concept of a site (as in a specific Site class/object). "Sites" are normally represented by pages into a project-specific hierarchy structure. Also, AEM does not manage sites as an entity, but only knows of pages, which can be updated individually or in bulk.
That means, that you need to come up with your own definition of a site, and what "last modification" date of a site means. Is the latest change published on any page below a certain tree? What about updates on assets which are referenced from these pages?
As soon as you have a clear definition of it, you can think about implementing it. I can think of many ways to implement, with different tradeoffs regarding performance impact and accuracy.
I do not think, you can get such type of modification date in AEM site. Since, in AEM each page is independent of each other. Suppose, in case of Drupal or any other CMS, they have the database. So, in those applications, they can(might??) get the recent modification date. But, in AEM, I do not think so.
Will wait, for others reply
jcr:lastModified
property with the individual modification timestamp.Recommended Approaches:
Using jcr:lastModified
in HTL:
jcr:lastModified
. This property reflects the last modification date and time of that specific element.<sly data-sly-use="${'com.yourcompany.MyComponent'}"></sly>
public String getLastModifiedDate() {
return properties.get("jcr:lastModified").getString();
}
Custom Workflow:
Yes I am aware of the last modification date of the individual resources. Thanks for this information, but is there any log file where all the activities are getting captured and from that file we may able to get the date of last activity ? is it possbile ?
AEM does not have an implicit concept of a site (as in a specific Site class/object). "Sites" are normally represented by pages into a project-specific hierarchy structure. Also, AEM does not manage sites as an entity, but only knows of pages, which can be updated individually or in bulk.
That means, that you need to come up with your own definition of a site, and what "last modification" date of a site means. Is the latest change published on any page below a certain tree? What about updates on assets which are referenced from these pages?
As soon as you have a clear definition of it, you can think about implementing it. I can think of many ways to implement, with different tradeoffs regarding performance impact and accuracy.
Yes, the "last modification" date of a site means the latest change published on any page below a certain tree. I have implemented this by using Event Listeners in AEM.
Views
Likes
Replies
Views
Like
Replies