Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10061 karma points MVP 2x admin c-trib
    Jul 22, 2011 @ 18:11
    Ismail Mayat
    0

    umbracoNaviHide issue

    Guys,

    Using 4.7 and i have under my home page bunch of pages most are of type textpage and i also have 3 other different types.  Textpage has umbracoNaviHide property only one page in my list has this set to true.  I have the following code

    @using umbraco.MacroEngines
    
    @{
        dynamic homePage = new DynamicNode(1366);    
    }
    <nav id="nav-main">
        <ul class="body clearfix">
            @foreach (var page in homePage.Children.Where("umbracoNaviHide != true"))
            {
                if (Model.Id == page.Id)
                {
                    <li class="active"><a href="@page.Url">@page.Name</a></li>
                }
                else
                { 
                    <li><a href="@page.Url">@page.Name</a></li> 
                }               
            }
        </ul>
     </nav>

     

    so i am listing all pages below home where umbracNaviHide is not true.  I except 10 items to be listed however i only get 3.  These three are of a doctype that does not have umbracoNaviHide property.  If I add the property on that type then it also disappears from list.  In my macro for each if i take out the where condition i get all the pages.

    Really really weird?  Anyone any ideas?

    Regards

    Ismail

  • webangelo 107 posts 190 karma points
    Jul 22, 2011 @ 19:36
    webangelo
    0

    Hey Ismail.

    Try

    homePage.Children.Where("Visible")

    --Chris

  • Ismail Mayat 4511 posts 10061 karma points MVP 2x admin c-trib
    Jul 25, 2011 @ 11:01
    Ismail Mayat
    0

    webangelo,

    tried that still no joy. only thing that seems to work is if i set it to true then publish then set it to false then publish again. 

    anyone else seen this?

    Regards

    Ismail

  • Bert 128 posts 251 karma points
    Jul 25, 2011 @ 12:35
Please Sign in or register to post replies

Write your reply to:

Draft