Hey everyone. I'm currently making a shopify section that is a slideshow that will swap out desktop and mobile images. However, I'd like it to be possible to include more than one on a page if the user wanted to. This conflicts with the slickslider that I use as you can't have more than one slider with the same name. I avoid this problem by having the user set the slider name in the customize editor. However, if they don't set a name this will break. Is there a way to make a section setting mandatory? Or does anyone have any other idea on how to circumvent this issue? Thanks for your time.
Solved! Go to the solution
You can make this mandatory in the sense that if the user doesn't add a value into the field you just choose not to show the section at all. In the theme settings however that info will remain optional.
As long as you have a way to identify each slideshow it really shouldn't matter if there's a name or not. For example, if there's the same class or data attribute on both you will still be able to reference each individually with JS via their index.
|4 seconds ago|
|an hour ago|