Slider: data-x-slide-goto and {{dc:looper:index}}+1

Hi

I am trying to build a stacked slider where the first slide is the navigation slider. In that first slider I will have a list of navigation items that each links to a slide. The navigation list and the sliders will be populated from a looper provider.

In order to get it to work, I need to use data-x-slide-goto on the navigation items and give each item the value of the current looper item index + 1. Otherwise the first navigation item will link to itself while the other items will link to “one slide off”.

Can I somehow add 1 to {{dc:looper:index}} in the Value field? That would make it work.

I hope my question makes sense.

Thanks.

Hello Mathias,

Thanks for writing in! Regretfully you cannot do addition with the looper index value in a custom attribute for your slide. I would recommend that you update to the latest version because, in the newer version, you can set which slide to display first. You can do your slides 1 to n with the same number as your looper index and you place your navigation item on the last slide. In your slider container element, set the “Starting Slide” so that the last slide will display first.

Best Regards.

Hi @ruenel

Thank you very much. The Starting Slide option definitely helped a lot.

Is there a way for the Starting Slide to always be the last slide? I cannot use {{dc:looper:count}} as this would always be one behind :thinking: My end-goal is to build a component that can be reused across our site, but that is not possible as long as the Last Slide needs to be set manually.

Br.
Mathias

Hi Mathias,

As my colleague Runel says the first slide will be always the last slide and it works in an infinite loop. If you are seeing something different or trying to point out something else, please provide any screenshot marked with the issue or any video that helps us to recognize the problem.

Thanks

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.