Hi everyone,
How can i change the playing order of slideshow repeater items in wix studio? I cannot see any preference related with order and the slides always begin from the latest item which i see on the view of “layers”.
thans
Hi everyone,
How can i change the playing order of slideshow repeater items in wix studio? I cannot see any preference related with order and the slides always begin from the latest item which i see on the view of “layers”.
thans
This solution is possible though code. Let’s say you have a slideshow (element ID: slideshow1) with 4 slides and want to play them in the following order: Slide 3, Slide 2, Slide 4, Slide 1. You could do this by running the following function from the page’s on ready function:
$w.onReady(function () { play_slideshow(0) }
function play_slideshow (current_slide) {
let play_order = [2,1,3,0]
$w("#slideshow1").changeSlide(play_order[current_slide])
current_slide++
if (current_slide > 3) { current_slide = 0 }
return setTimeout( () => { return play_slideshow(current_slide) }, 5000)
}
//You can change the 5000 to the speed that you want the slides to change.
Hope this helps!
Thank you so much. I tried it. My item name is also slideshow1 but it says “slideshow1” does not exists. The code is in global code. Why it does not see the id of slideshow?
and also this code works but the slideshow always shows slide zor at the beginning than changes according to the desired order. I think it set the last slide before onReady function. I want to change currentIndex before the slideshow starts
The simplest way would be to re-order the slides in the layer section. It starts with the last one and works it’s way to the top one.
It is not possible to change order of slide items in the layer section in wix studio but it is possible in the simpler editor of the wix. Although wix studio is more advanced this is the situation as i see and i use wix studio.
My Solution is: data comes from cms for the slideshow repeater. I added a column which represent the order and in the database settings, set a sort based on this new field. Bu i don’t understand this: wix studio is more advanced than basic wix editor but some lack of this kind of basic feature compared to basic version