Jump to content

Images pagination


nikola

Recommended Posts

On 6/16/2020 at 10:11 PM, Violet said:

🤔 My question is, I'm wondering if there is (or could one day be) a function in the ProcessWire API that as a one line command, converts images on a page to a (temporary) page array, each element of which contains one image? 😶The idea being that the resultant page array could be used directly for pagination purposes just like any other page array, which is handy for image gallery situations such as this. It seems like it's a common issue people are facing.

@Violet I wonder if you missed the well explained solution of gingebaker here in this thread:

Isn't the PaginatedArray class just what you are looking for?

  • Like 1
Link to comment
Share on other sites

Thank you @TheMick- it looks like I did miss that. It sounds like it would work, although I admit it's a bit beyond me - I'm not an experienced programmer. I was hoping to avoid writing functions. I can't remember what I did in the end on my particular project - I think I just decided to use a reasonable number of images that would look OK on 1 page and didn't bother paginating them. If I need to go back to that I will definitely take another careful look at the solution you mentioned and implement it for my situation.

Thank you for bringing this to my attention, as other people who come across this thread will now be able to direct themselves to the solution you mentioned 👍
😀

  • Like 1
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
  • Recently Browsing   0 members

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