I've been trying to get my head around why my navigation macro isn't outputting the pages the currently have in the site root. I get not errors and i'm using the standard navigation snippet supplied with Umbraco 6.2.2.
Thanks you for the welcome and your suggestion. Unfortunatly your code outputs the same as mine. Meaning and empty <ul> with no <li>'s (no pages) from navigation script except what you see in my screenshot i my first post above.
I seems the PV Razor Macro is working fine but for some reason does not output the pages in the navigation...
Thanks again and sorry for the confusion regardinga "partial view" or "parital view macro".
Partial output from navigation
Hi
I've been trying to get my head around why my navigation macro isn't outputting the pages the currently have in the site root. I get not errors and i'm using the standard navigation snippet supplied with Umbraco 6.2.2.
Problem is i'm seeing the <nav> and <ul> but no <li>'s within in frontend. URL: http://nssas.dk.nt7.unoeuro-server.com/
I have tried changing the "root" variable to "AncestorOrSelf("Forside");" which is "Home" but that doesn't do a darn thing.
Any help will be appreciated. Thanks a lot in advance.
Navigation Razor snippet:
@{
@* Get the root of the website *@
var root = Model.AncestorOrSelf(1);
}
<nav class="main-navigation">
<ul class="nav navbar-nav navbar-right">
@foreach (var page in root.Children.Where("Visible"))
{
<li class="@page.IsAncestorOrSelf(Model, "current", "")">
<a href="@page.Url">@page.Name</a>
</li>
}
</ul>
</nav>
Hi Jeppe, and welcome our.
When you say partial did you mean a partial view or parital view marco, if so try this code instead.
Hope this helps,
/Dennis
Hi Dennis
Thanks you for the welcome and your suggestion. Unfortunatly your code outputs the same as mine. Meaning and empty <ul> with no <li>'s (no pages) from navigation script except what you see in my screenshot i my first post above.
I seems the PV Razor Macro is working fine but for some reason does not output the pages in the navigation...
Thanks again and sorry for the confusion regardinga "partial view" or "parital view macro".
Ok, i redid my page-structure and that fixed the problem :) Thanks again
is working on a reply...