Programmatically change the slidebar menu

I am trying to populate my Slidebar menu (built by Bubble) with a list kept in a state.

I will built a list that will create all my menu items. The menu is built based on the user’s logged-in rights that I have stored. As an example the list kept by the state will look like the following after it has been built:

profile, accounts, logout

This will of course render only 1 menu item instead of 3 as the elements need to be separated by “ENTER” and not by comma.

Question: What character do I use that Bubble will understand as ENTER? Is it escape sequences like \n or something else altogether? I am thinking of using an API Workflow on a list to concatenate the menu items.

Thanks in advance.

When you paste the custom state list into the dynamic data input, put :join with and then type in line_break. That will replace the commas with enter.

Thank you so very much Patricia. Solved the problem outright. :+1:

This topic was automatically closed after 70 days. New replies are no longer allowed.