Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jules 204 posts 447 karma points
    Jan 27, 2016 @ 11:31

    Get most-recently updated media items

    How can I get the 10 most recently updated media items?

    I feel like I should know how to do this, but not immediately obvious as I am not sure we can query media in the same way as content.

    Lots of media on the site by the way so would need to be quick.


  • Anders Bjerner 444 posts 2568 karma points MVP 4x admin c-trib
    Jan 28, 2016 @ 12:39
    Anders Bjerner

    All media should be in your Examine index, so you could make a search in Examine for all media, and then sort the results by either their create date or update date in descending order, and then take the first 10 results.

    If you're unsure how to do this with code, ping me back, and I'll dig up an example for you ;)

Please Sign in or register to post replies

Write your reply to: