Jump to content

Sort images in an images field by date modified


Alex
 Share

Recommended Posts

Hi,

I'm having problems getting a series of images in the same standard images field to sort by date modifed/created.

How would I add the ->modified property here to get the images to display in order of date modified/created?

if ($page->images) {
		foreach($page->images as $image) {
			$thumbnail = $image->size(868,0);
			echo "<img class='r' src='{$thumbnail->url}'/>";
		}
	}

Have tried a few variation with no luck yet : (

thanks

Alex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...