Creating a dynamic navigation menu from an api

I managed to get the navigation to show with the above code just fine. The problem is i want the navigation to replace the main menu, rather than creating a new menu in my child view.

I spent more time debugging the issue and updated the code with what i had so far so the opening post isnt exactly valid anymore in terms of the issue, i apologise. the code however is up to date. It would work fine for a nested menu / Multi-Level menu. e g if i had a navigation in my main view and another one in my child view. So it would show both if i was to visit the page.

1 Like