I thought you were looking for something like this (which is inserted into your template, as described in my first post).
Note: this is generated for WebForms sites, and MVC will look a little different.
<umbraco:Macro runat="server" language="cshtml">
@inherits umbraco.MacroEngines.DynamicNodeContext
@*
Macro to display child pages below the root page of a standard website.
Also highlights the current active page/section in the navigation with
the css class "current".
*@
@{
@* Get the root of the website *@
var root = Model.AncestorOrSelf(1);
}
<ul>
@foreach (var page in root.Children.Where("Visible"))
{
<li class="@page.IsAncestorOrSelf(Model, "current", "")">
<a href="@page.Url">@page.Name</a>
</li>
}
</ul>
</umbraco:Macro>
Dynamic Menus with Dynamic Level
How to create Dynamic Menus with Dynamic Child Levels??.
Log into the Umbraco backend, then select the Settings section, and then select a template to edit.
The editing area for the template has an icon which allows you to insert an inline razor macro, which has a few options for adding menus.
Can u please Elaborate provide Code for it
Hi Sagar.
I might be wrong, but it sounds like you are looking for a menu that uses a traverse method helper to iterate children and create a dynamic menu?
Could this work for you?
Thnxx Dennis it worked, but having some allignment issue which i will be fixing
Thnxx for the reply..
Great! Glad to help!!
Yeah, it probobly needs som Css-lovin to make it look pretty, but that should be a quick fix.
Take care, best of luck with the rest of the site!
/ Dennis
Apologies Sagar
I thought you were looking for something like this (which is inserted into your template, as described in my first post).
Note: this is generated for WebForms sites, and MVC will look a little different.
is working on a reply...