Can I build a Slideshow using Wix Code?

Hi, I have a slideshow that will have many slides that may be dynamic at certain times. What I would like to do is to load a DB with all the info and build the slideshow as the page loads. Is it possible to do so?
I would of course set $w(“#mySlideshow”).slides as an array and within that set each slides children array with the needed elements.

I have 40+ slides that populate the DB and are populated via the DB and include a lot of logic and components on each slide. Plus a lot of code.

I am doing this successfully (sort of), but be careful. The latest update by Wix seems to have cratered the slideshow component I am using and is causing some pretty severe performance issues for me right now. That being said, I am doing exactly what you are suggesting as it is a great way to keep from having to reload the page for each section. If anyone knows of a reason why I should reconsider (using the slideshow component…not Wix…) I would love to hear it as well.

thanks @jayjohnson Would you mind sharing your code?

Which of the 2,370+ lines of code would you like [:~) ? And that is just on my home page! Maybe tell me a little bit of what you are trying to do and I can get the appropriate snippets to you. You do not need to set the slideshow as an array. Check out the methods and data available on the slideshow component and you will see that it handles a lot of that for you. You just need to keep track of all of your components. I actually have a naming convention that I used for the components on each slide and then used this to do selective populating with code when I go to a new slide.

Anyway…let me know what you are having problems with and I will see if I can make a suggestion.

Oh, i think maybe I misunderstood. I want to be able to duplicate slides based on a database. For every line in the DB, add another slide with 2 components. Is that what you are doing?

@mennyg19 I don’t think it’s possible. You can’t create new slides by code. But you can populate place holder elements on existing slides with your data.