How do I change the slide number when an image is slid left or right

I have an image slider plugin (slick slideshow) I’m using to display a list images. The user can slide left or right. I need to show the image number of the current image in the bottom right. Does anyone know how to change the custom state number when an image is slid left or right? I simply want to minus one or plus one to the number based on which way the image is slid.

Or does anyone know how I can get the index of an image in a list of images? There’s got to be a way to access this right?

Like, can I say “when this slideshow’s current slide is the image in the list of images” set the custom state to the index of the image?

You don’t need to do as a custom state.

You can add in your DB the data Banner with an image and number.

Than you select the datasource of the slider do a search for banner.

In the page where the banner is exposed you insert a text showing the current slide number.
Screen Shot 2023-03-18 at 12.21.13 PM

Thanks @ezduriez, what happens when the user uploads more images and deletes images, then uploads more? How do I define the number as the index of the image in the list? If a user deletes some images and then uploads more, wouldn’t that throw off the number set on each image? I would need the previous numbers to change to represent their index in the list. Right?

You need a different WF to upload pic, edit pic and delete pic. Insert the number of the pic in your DB and instead of search for banner you search for pictures.

This is another situation from your inicial issue to show the number of the slider. But it’s also something you can solve with the correct WF.

I have 3 different workflows for all three of those. When an image is uploaded I have it assigned a number but once the image is reorganized (drag & drop) the number that’s assigned to it stays with it. That’s causing another issue. Hmmm, I really appreciate all your help, maybe this just isn’t possible with my current setup.

If the number stays with it, you’ll need to change the setup
Let’s try this setup to fix it if you like the idea.
Instead of drag and drop change this picture order to simple arrows left and right and use the following WF.
Screen Shot 2023-03-18 at 7.55.49 PM

Screen Shot 2023-03-18 at 7.57.42 PM

You will need a WF to the right and another one to the left and both has to be in 3 steps.
Screen Shot 2023-03-18 at 8.02.45 PM

To the right => Step 1 search for parent group picture + 1 and change the number of this picture to this picture number - 1

Step 2 add a pause before next action

Step 3 change the parent group picture number +1
Screen Shot 2023-03-18 at 8.10.40 PM

Now you will be able to display the correct numbers of the slideshow.

Hope it helps!

This topic was automatically closed after 70 days. New replies are no longer allowed.