Can some one please explain how to mdify the default navigation menu in the umbraco 5.0.1 source code.
I need to change the DynamicModel so that it accepts the custom navigation menu.Need to modify the @DynamicModel in the navigation.cshtml,so that i can have my own navigation menu
I have made the modifications to the default code as above,Now I can see Child menus and 3rd level child menus too.Hope would be useful to someone.And to change DynamicModel we have to modify it from the backoffice,I was ignorant.
Can anyone please say how the performance will be affected by the code i have modified...? I am starting to realize it is slowing the performance..?Any ideas how to show multilevel navigation menus from a partial view in umbrao 5.0.1 apart from the above code.......?
What performance issues are you seeing? Also, have you found a solution to the "Hide in Navigation" problem. I don't want every single page showing up in my navigation.
Navigation Menu in Umbraco 5.0.1
Can some one please explain how to mdify the default navigation menu in the umbraco 5.0.1 source code.
I need to change the DynamicModel so that it accepts the custom navigation menu.Need to modify the @DynamicModel in the navigation.cshtml,so that i can have my own navigation menu
Thanks in advance
@inherits RenderViewPage
@using Umbraco.Cms.Web;
@{
var Homepage = @DynamicModel;
while (Homepage.ContentType.Alias != "homePage")
{
Homepage = Homepage.Parent;
}
}
<div id="menuwrapper" style="display:inline;">
<ul >
<li><a href="@Homepage.Url">Home</a></li>
@foreach (var item in Homepage.Children)
{
if (@item.CurrentTemplate != null)
{
var childName = item.Name ?? "(No name yet)";
<li ><a href="@item.Url">@childName </a>
@*============ this is child menu ===========*@
<ul >
@if(item.Children != null)
{
foreach(var chil in item.Children)
{
var chilName = chil.Name ?? "(No name yet)";
<li><a class="subAnchors" href="@chil.Url">@chilName</a>
@*============ this is sub child menu ===========*@
<ul >
@if(chil.Children != null)
{
foreach(var subChild in chil.Children)
{
var subchildName = subChild.Name ?? "(No name yet)";
<li><a class="subSubAnchors" href="@subChild.Url">@subchildName</a></li>
}
}
</ul>
</li>
}
}
</ul>
</li>
}
}
</ul>
</div>
I have made the modifications to the default code as above,Now I can see Child menus and 3rd level child menus too.Hope would be useful to someone.And to change DynamicModel we have to modify it from the backoffice,I was ignorant.
Can anyone please say how the performance will be affected by the code i have modified...? I am starting to realize it is slowing the performance..?Any ideas how to show multilevel navigation menus from a partial view in umbrao 5.0.1 apart from the above code.......?
waiting for the reply
Thanks
I am trying out your code. Thanks for that.
What performance issues are you seeing? Also, have you found a solution to the "Hide in Navigation" problem. I don't want every single page showing up in my navigation.
Thanks,
Doug
is working on a reply...