Copied to clipboard

Flag this post as spam?

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


  • sg 33 posts 83 karma points
    Jun 05, 2014 @ 16:14
    sg
    0

    How to remove "About US" from top navigation but still display "Contact" macro on homepage

    Hello,

    I have a need to "not show" the "About Us" in top navigation. But I still need to be able to see the Contact details ( which are set using the contact macro") on the homepage. If I unpublish the "About Us", the child node "contact US" also disappears from the bottom of homepage. How can i still show the contact deatils?

    Please help.

    Thanks Shilpi

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Jun 05, 2014 @ 16:34
    Dennis Aaen
    0

    Hi sg,

    You can hide the about us item from the top navigation by added a propperty on your document type, the type should be an true/false type, and should have an alias of umbracoNaviHide. And if you are using razor, you should add .where("visible"), an example could be:

    @{
        <ul>           
            @* For each child page under the root node, where the property umbracoNaviHide is not True *@
            @foreach (var childPage in CurrentPage.Children.Where("Visible"))
            {
                <li>
                    <a href="@childPage.Url">@childPage.Name</a>
                </li>
            }
        </ul>
    }

    It will only appear if it not has the umbracoNaviHide set to true.

    Here is some more info about it: http://our.umbraco.org/wiki/reference/umbraco-best-practices/umbraconavihide

    Hope this helps, if you want more detailed information about it, just say, and I will try to help you further.

    /Dennis

  • user111 4 posts 74 karma points
    Dec 08, 2016 @ 13:33
    user111
    0

    Hello! I'm create Contact. when customer input field in form and submit. I'm view in Umbraco Admin. I don't want contact show in menu. Please help me

  • Dennis Aaen 4499 posts 18254 karma points admin hq c-trib
    Dec 08, 2016 @ 13:47
    Dennis Aaen
    100

    Hi user111

    When you say you donĀ“t want to show contact in menu do you mean on the front-end of your site. If so try to see.

    https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/73459-hide-from-navigation#comment-235423

    Hope this helps,

    /Dennis

  • user111 4 posts 74 karma points
    Dec 08, 2016 @ 14:16
    user111
    0

    Thank you Dennis!

Please Sign in or register to post replies

Write your reply to:

Draft