Help with 'scroll to' in RG inside a RG

I’m building a learning platform, where the content (learning resources) are organized inside section, the sections can have sub-section, and even sub-sub sections (example in the image after the text), the database structure is that each sections has a parent_ID if it’s a child of another section, and children_IDs which is a list of all the sections who are a direct sub-section of that section (not a sub-sub, which is a child of a child)

A user can click on the button “next resource” which supposed to scroll the page to the section of that resource, the problem is that I don’t know how to scroll to sub-section (or sub-sub-sections)

The main sections are shown in a RG, each section when clicked toggle a hidden content box that has another RG of the section’s children (sub-section), and those sub-sections when clicked toggle a another hidden content box that has another RG of the sub-section’s children (sub-sub-section)

Example of structure

My question is how can I scroll to a sub-section/sub-sub-section?

*The referencing to which section is next is taking the next resource they user needs to complete and taking their section

You’ll probably need to look into a plugin that lets you reference things inside RGs from outside in order to achieve this (as you can’t do that in ‘native’ Bubble)…

We do it with the Orchestra plugin, so take a look at that. You can use it to refer to things inside a RG (including nested RGs). It takes a bit of learning and setting up, but you should be able to achieve this using that plugin.

Thanks, I’ll look it up

How would you go and refer to a resource that is inside a sub-sub-section? Because the parent_ID only goes to the direct parent so I can’t know who is the direct parent without doing a lot of calculation and searches that will damage the performance

Depending on how your database is set up and how you’re defining the ‘current’ resource on the page, it should be simple enough to just refer to the next resource in the list (however that’s defined in your database structure).

Having said that, as you’re using 3 layers of nested RGs, I’m not sure it’s possible to do it with the Orchestra plugin - I’ve only ever managed to do it with nested RGs two layers deep - I’ve never tried it with 3 layers… it might be worth investigating still… or there might be an easier way that someone else knows (maybe using some custom JS).

Okay, I’ll wait for more people to comment, thank you anyway!