Can I use anchor tags navigate to a page and bring to focus a specific slide using the new Slider Element?

I created a slider, and gave each slide an ID (using dynamic content). I would like to be able to link to the page where the slider is and show the appropriate slide. Can I do this with anchor tags? or how would I be able to do it?

Thanks!

Hi Oriol,

Thanks for reaching out about this. This is possible using Custom Attributes. For example, if you have a button with data-tco-slide-goto set to 3, clicking that button will navigate to the third slide.

That should be enough to get something working, but if you want to go a step farther you can tie it in with Loopers. It’s not in the UI yet, but there’s a way to rewind a looper.

  • Open the Dev Toolkit (Enable from preferences)
  • Inspect your Looper Consumer
  • search for “rewind” in the Dev Toolkit and enable it. Now you can “consume” the same Looper Provider again entirely with a new Consumer
  • Use a second consumer outside the Slide Container to create your anchors
  • Set data-tco-slide-goto to {{dc:looper:index}}. This will create the correct number of anchors that match the slides they will be navigating to.

Hopefully this helps!

1 Like

Can this be done from a different page? Or does the navigation link have to be in the same page as the slider?

Hi Oriol,

Currently, the slider can be controlled using the custom attributes on the same pages only.

Thanks

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