Jump to content
Sign in to follow this  
Mikie

Add images to the start of field

Recommended Posts

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.

  • Like 1

Share this post


Link to post
Share on other sites

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/

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

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.

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...