Copied to clipboard

Flag this post as spam?

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


  • Jules 276 posts 587 karma points
    Jan 27, 2016 @ 11:31
    Jules
    0

    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.

    Jules

  • Anders Bjerner 487 posts 2990 karma points MVP 8x admin c-trib
    Jan 28, 2016 @ 12:39
    Anders Bjerner
    1

    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:

Draft