Get the last modified page from page or XF | Community
Skip to main content
veerareddyc1015
Level 3
August 3, 2026
Question

Get the last modified page from page or XF

  • August 3, 2026
  • 0 replies
  • 4 views

Hi Team,

I have an AEM page that includes one or more Experience Fragments, also known as XFs. The page is already published and is accessed through a domain on the AEM Publish environment.
I need to display a “Last Modified” date on the main page. This date should be calculated based on the latest published modification date across the main page and all related or referenced content.
The requirements are as follows:

  1. If the main page is modified and published, the displayed Last Modified date should be the main page’s latest published modification date.
  2. If one or more Experience Fragments used on the page are modified and published, while the main page itself is not modified, the displayed date should be the latest published modification date of the Experience Fragment.
  3. If both the main page and one or more Experience Fragments are modified and published, the displayed date should be the most recent published modification date among them.
  4. If an Experience Fragment used on the page contains a nested Experience Fragment, and the nested XF is updated and published, should the Last Modified date be updated based on the nested XF’s latest published modification date
  5. If the main page is associated with a CCVar configuration page, and the CCVar page is updated and published, should the Last Modified date be displayed based on the CCVar page’s latest published modification date
  6. If the main page contains an Experience Fragment, and that XF is associated with a CCVar configuration page, then if the CCVar page is updated and published, should the Last Modified date be updated based on the CCVar configuration page
  7. If the main page contains an XF, that XF contains a nested XF, and the nested XF is associated with a CCVar configuration page, should the Last Modified date be calculated based on the CCVar configuration page’s latest published modification date
  8. For example, consider a Savings Calculator tool page that has an associated configuration page. If the configuration page is updated and published, should the Last Modified date on the Savings Calculator page be updated based on the configuration page’s latest published modification date
  9. If the Savings Calculator tool page has a configuration page, and that configuration page is associated with a CCVar configuration page, should the Last Modified date be displayed based on the CCVar configuration page’s latest published modification date
  10. Similar to the Savings Calculator tool, there may be multiple tools on the site with their own configuration pages. Do we need to check each tool and its related configuration pages individually when calculating the Last Modified date


In short, I need to determine and display the latest published modification date across the main page and all directly or indirectly referenced content, including:

Main page
Experience Fragments
Nested Experience Fragments
CCVar configuration pages
Tool configuration pages
Any other dependent configuration content used by the page or its references

Could you please provide an AEM-based solution, do we need to go with servlet and ajax without cache or do we need to go with Sling Model code, to implement this functionality on the Publish environment?

Thanks in Advance

Regards
Veera