Mikie Posted October 24, 2019 Share Posted October 24, 2019 Hey, I've tried a search but couldn't find anything about this precisely. Is there any explicit setting to add images to the start of an image field rather than the end on upload? I'm assuming I'll need to figure this out with hooks. Please ignore. Noob mistake asking a question from a client, they weren't drag dropping and I had a brain spasm. 1 Link to comment Share on other sites More sharing options...
psy Posted October 24, 2019 Share Posted October 24, 2019 All good. Did you know about: $page->images->first and $page->images->last I often use $pages->images->last when client uploads images and wants the last one to display. To get really specific, you can call the image within a Pageimages array by calling the image by its index. Pageimages derives from WireArray which allows you to call an item by its index https://processwire.com/api/ref/wire-array/eq/ 1 Link to comment Share on other sites More sharing options...
Mikie Posted October 25, 2019 Author Share Posted October 25, 2019 Thanks @psy yeah I know about those, it was more an editing workflow thing. Client has 50 + images in a gallery, flagged they were being added to the end not the start. I didnt realise they were using the filesystem select and not just drag dropping onto the field. Having said this, it's interesting that those two workflows for adding images function differently. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now