Top and Sub Navigation Code is pulled directly from the github here.
Site loads with no error, but the menu will not display. When I inspect, I see the following.
<ul class="navbar-nav ms-auto py-4 py-lg-0">
<!-- comment out the following line if you want to remove the root node name from the top navigation -->
<a class="nav-link navi-link--active" href="/">Home</a>
<umbnavitem menu-item="item" active-class="nav-link--active" class="nav-link">
</umbnavitem>
<umbnavitem menu-item="item" active-class="nav-link--active" class="nav-link">
</umbnavitem>
</ul>
I am not sure what I am missing, but any advice would be greatly appreciated.
This is working successfully, but now I'm not sure how to add the dynamic values for the additional child links. I'm still researching, but im not sure what the call is for the children of children if that makes any sense.
The _TopNavigation code template is only designed to display a single level of the menu, you will need to add your own template if you require dropdowns/multilevel menu items.
I'm not at my PC right now, so not able to post you an example, if nobody else chimes in I will post an example later today when I am back at my computer.
Umbraco UmbNav
Hi there - new umbraco developer.
I'm trying to implement the Umbraco UmbNav found here: https://www.nuget.org/packages/Our.Umbraco.UmbNav.Web
I've completed the install and have the new property type. I've added it to my homepage doc type and have the menu created.
master page
navigation partial
Top and Sub Navigation Code is pulled directly from the github here.
Site loads with no error, but the menu will not display. When I inspect, I see the following.
I am not sure what I am missing, but any advice would be greatly appreciated.
did you add the code for the taghelper in your _ViewImports.cshtml ?
This code
Thank you.
That fixed the display of the top nav, but now the dropdowns aren't working.
When I inspect I see:
Test should have have two dropdowns below it.
Hi Cedeste,
You will need to use something like below in your _TopNavigation template
Thank you!
Obviously, if you need more than 2 levels it will need expanding further, but just shout if you need more assistance.
Thank you. I'm starting to look at it now. I really appreciate your help.
Thank you again. I used your example and worked it in with what I was able to come up with last night. I've got it this far:
This is working successfully, but now I'm not sure how to add the dynamic values for the additional child links. I'm still researching, but im not sure what the call is for the children of children if that makes any sense.
Hi Cedeste,
You just need to repeat what you have done for each level that you want to expand, so in your
Section you would do another check for children
You could simplify it by using some razor functions/helpers
Hi Cedeste,
The _TopNavigation code template is only designed to display a single level of the menu, you will need to add your own template if you require dropdowns/multilevel menu items.
I'm not at my PC right now, so not able to post you an example, if nobody else chimes in I will post an example later today when I am back at my computer.
is working on a reply...