Jump to content

Change sort order of Images Field in the backend


glebster
 Share

Recommended Posts

Hello!

How can i change the sort order of IMAGES Field in the backend?

When i add new image to the field IMAGES it displays at the end of the list.

When i edit page i need to show new image at the start of the list.

Please help :)

PS. ProcessWire the best CMF i ever seen!!! :)

Link to comment
Share on other sites

Welcome! This is not currently possible if I remember correctly. You have to drag it (move) to first position after uploading. If you hover the colored bar of the item on the far right side you see and "to top", "top bottom" buttons that can be handy to move from bottom to top.

Link to comment
Share on other sites

I think that the push-to-top/push-to-bottom buttons that Soma mentioned are your best bet, as that makes a simple job of moving an image to the top of bottom. But you'll need to save the page with the image on it before you'll get that option.

As another alternative, you might try just reversing the order that they are output on the front-end of your site:

foreach($page->images->reverse() as $image) {
   echo "<img src='{$img->url}' />";
}
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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...