Accordion opens on active page

Hi I’m using an accordion as a widget nav for a course type of website, the lessons are separated into chapters hence I’ve used the accordion to separate the lessons into the correct chapter so the navigation can collapse and open with a click of the button, similar to how the Themeco Docs Navigation is set out.

What I am struggling to figure out is a way to only have the correct accordion open based on what page is open.

As an example if I have 3 chapters each with 3 lessons this equals to three separate accordions,
if I open chapter 2 lesson 1 - is there a way to have the correctly associated accordion open with the page that is currently open.

Hi @cezarzw,

Thanks for reaching out.
It is not very clear what exactly you are trying to achieve here. If you have to have a different page for each Lesson or Chapter, you can set the Starts Open option of the specific Accordion Item to On as shown in the given screenshot.

If that is not the case, can you please explain it a bit more? If you have any specific URL explaining that, please share the URL too.

Thanks

Hi thanks for the reply. I am using the layer builder and pulling in the content dynamically, Im trying to control the accordions so that the right one is open based on the lesson being viewed, at the moment I have them all set to open at all times, but would like only one to be open, the one that is specific to the lesson.

Essentially trying to achieve the same look as the theme.co Docs navigation,

Hi @cezarzw,

Unfortunately, there is no option to control the Starts Open attribute dynamically.

Thanks

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