Dynamic Category-Subcategory Navigation System in Bubble.io

I am trying to create a navigation system with categories and subcategories in Bubble.io. I have set up a repeating group for categories and another for subcategories. When I click on a category, I want to display only the related subcategories in the second repeating group. However, I am having trouble connecting the two repeating groups and setting up the conditional visibility for the subcategories. If anyone knows a better approach to achieve this functionality, including suggestions for structuring the database, I would appreciate your help.

In pictures i am uploading my data base structure.

The datasource for the second RG just needs to be the selected Categories Sub-Categoires

It still shows all subcategories, and i want only those that are linked to the main category.

If you constrain your datasource for the second RG to the selected Category then it will only show the relevant sub-categories.

If it’s showing ALL sub-categorires then you obviously haven’t constrained your datasource correctly.

I’ve got no idea how you’re currently trying to do this, so feel free to share some screenshots if you want someone to help you find your error and give some specific help.

Okay so for the main category cell i did workflow, Navigation>go to page, in destination its current page, then i checkbox send more paremeters to the page that are visible in the first screen shot.

In second RG that is for subcategory my type of content is sub category, In data source i put:
search for category with constraint visible on the second screen-shot but i dont know why


Don’t set the url parameter the the category’s name. Use the unique ID instead.

Then just set the data source for the second RG to: Get Category from URL’s Sub-categories.

Hey, thanks for your response! I’m still pretty new to Bubble.io, and I’m having a bit of trouble understanding what you meant. Could you please break it down for me in simpler terms?

  1. How can I set the URL parameter to the category’s unique ID instead of its name when someone clicks on a category?
  2. How do I create the ‘Get Category from URL’s Sub-categories’ expression for the data source of the second Repeating Group?

Any extra tips or examples would be awesome. Appreciate your help!

Just select the ‘unique I’d’ instead of the ‘name’ n your expression.

I’m not too sure what you mean… you’re already doing this in your screenshot in your search… so just do it directly in the data source instead. Just refer to the categories data source as the list for the RG.

1 Like