How do you create menus and submenus?

I want to know the best way to creating a menu (and submenu) through Bubble. For me, I’ve created a Data Type called Menu which contains the following fields:

  • Order (ex: 1)
  • Slug (ex: menu-item)
  • Title (ex: Menu Item)

Then, I display this data in a Repeating Group by their Title and sorted by the Order number. With this setup, I haven’t found a way to add submenus if I wanted to.

Looking at Bubble’s app, I see they add the menu items manually. I prefer to not go the manual rout and just list them through a Repeating Group.

1 Like

I haven’t used the data type method, I usually just hand build things in a reusable element.

I see that’s how Bubble.is set up their own menu. I find the data type helpful especially since I created a settings page to add additional menu items and reorder them. Do you use sub menus?

1 Like

In one of my headers, I do have two submenus. If you go the data type approach, couldn’t have a field on a Menu item that contains a list of Menu Items? Then in building the sub menu, you could reference “parent group’s Menu’s Menu Items” to build out the sub menu? Just thinking out loud, not sure if it’d work

After trying different methods, I couldn’t find a way to create menu/submenus using the data types. Instead, I just created the main menu using the Text element. Then, I used a Group Focus element to display the submenu items.

Just create a new database called submenus. Add a field ‘menu’and assign each submenu row to a menu. Then create a repeating group within your menu repeating group that shows submenu items that are linked to the menu. Should be fairly simple.

1 Like

Or add a column with the depth index…