Select topics from chapters like in the weweb documentation

Hi there,

has anyone done cascading lists (or is it even possible)?

I have a bunch of topics (text objects) organised in chapter, sub-chapter, and then the topic. Ideally I would first like to display the list of chapters. When selecting a chapter the associated sub-chapter should open as a list underneath. And finally when selecting a sub-chapter the associated topics list underneath.

Basically it should work exactly like the selecting a topic in the weweb documentation.

Any suggestions or examples? Thanks

What backend are you using and what exactly you’re looking a solution for? Displaying data? Fetching data?

Thanks for your answer, Broberto,

I am using Xano as the backend. Currently I have a db table for each level (chapter, sub-chapter, topic). Fetching the data is done via Xano add-ons so I get all the data in one json. It’s less than 100 topics so I think it should be ok.

In the meantime I have created cascading containers. When selecting a chapter I update a variable with the chapter id from Xano. The sub-container has a conditional rendering where I test if the variable equals the parent Xano id of the sub-chapter.

That way only one sub-chapter can be opened. Which is ok for my case.

But, is there a way to attach a variable or state to each instance of the container (or something else) in the list? That way multiple chapters could be opened at the same time.

Thanks

Could you send screenshots of what you mean? :slight_smile: Also how you’re displaying it rn would be great