Forum

Thread tagged as: Question

Get the latest page updated

Hello,

I’m working on a site where I want to highlight the latest page updated in various sections (each in a folder). What would be the best way of doing this (and can it be done)?

I was thinking of using perch_content_custom with the field set as pageModified. However it doesn’t work so I’m assuming the field must exist in the region. Is there a way to sort by the modified date of the page?

The other idea I had would be to run a SQL query on pageModified and then send the pagePath to perch_content_custom. Would that be the best way to do it?

Thanks

Nick

Nick Bramwell

Nick Bramwell 5 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

There's currently no supported way to do that. If you chose to query the database directly, I couldn't provide any guarantee that it would keep working across updates.

Thanks Drew, is it the sort of thing I might be able to do using the API or would that still have the potential to be broken by an update?

Drew McLellan

Drew McLellan 2638 points
Perch Support

The API doesn't provide access to that information, no.