I’m want to add a navigation menu to the header for logged in users and want to ensure I’m doing this correctly without breaking Canvas.
I’ve checked the docs here: Menus & Navigation - Canvas Manual & https://docs.airdev.co/canvas/canvas-functionality/reference/reusable-elements/header but it’s not clear on the best way to approach this.
For clarity I would like to link to some of my Bubble app pages that are for logged in users only. I’d like these to display in the same way as the navigation for logged out users.
Any help would be much appreciated!
Currently, our Canvas Base Template does not include the functionality for header menu items to be visible to logged in users. However, you can make some tweaks to the Canvas workflows in order to achieve this:
- Under Data tab > Data types > Navigation link, add a new data field called Logged in? (yes/no)
- Run as an admin user and go to your admin portal > header/footer tab. From there, add a new header link for logged in users.
- In your Bubble app editor, go back to Data tab > App data > All navigation links and find all header links for logged in users. Edit each entry and set its field for “Logged in” to yes.
- Go to the header reusable element and select Group Desktop Menu Items. Check the box for the conditional statement: When current user is logged in then this element is visible.
Select the HTML header and edit the following data sources to include the logged in filter on the search
Open GroupFocus Mini and select RepeatingGroup Navigation link. Edit the search logic to include the follow filter
- Select Group Pages list and check the box for This element is visible on page load. Remove the conditional statement on the element.
You may want to move Group log out below Group pages list.
Hope this helps!
Thank you! This worked perfectly.