Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Amir Khan 1287 posts 2744 karma points
    Feb 05, 2014 @ 21:07
    Amir Khan
    0

    Publishing and uBlogsy Post causes other navigation items to disappear

    I'm experiencing some odd behavior where when I publish a uBlogsyPost other navigation items seem to disappear until the Umbraco cache is reset by either a full republish, or resetting the web.config. Any idea why this would happen? My nav partial seems fine, but here it is just incase.


    Thanks!
    Amir

    @inherits Umbraco.Web.Mvc.UmbracoTemplatePage
    @{
    Layout = null;
    var home = Model.Content.AncestorOrSelf(1);
    }

    <ul class="sf-menu sf-navbar clearfix">
    @*Render Home item*@

    @{ var homeActive = ""; }

    @if( home.Id == Model.Content.Id){
    homeActive = "active";
    }

    @*Render Home children*@
    @foreach (var item in home.Children.Where(x => x.IsVisible()))
    {
    var active = "";

    if(home.Id != Model.Content.Id ){ @* if NOT home *@
    if (item.Id == Model.Content.AncestorOrSelf(2).Id){
    @* if foreach id and currentpage ancestor id is equal *@
    active = "current sfHover sf-breadcrumb";
    }
    }
    <li class="@active @item.IsLast("last")">
    <a href="@item.Url">
    @item.Name
    </a>
    @if (@item.Children.Where("umbracoNaviHide!= true").Count() >= 1)
    {
    <ul>
    @foreach(var subitem in @item.Children.Where("umbracoNaviHide!= true"))
    {
    <li><a href="@subitem.Url">@subitem.Name</a></li>
    }
    </ul>
    }

    </li>
    }
    </ul>


Please Sign in or register to post replies

Write your reply to:

Draft