Copied to clipboard

Flag this post as spam?

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

  • Gitte Falkenberg 7 posts 96 karma points
    Jan 07, 2019 @ 15:55
    Gitte Falkenberg


    I'm working on a site ( and have some difficulties.

    1. I wish to remove the top green menu. Is that possible and how?
    2. I wish to make the bottom green "All Rights Reserved" border white with a thin green line between the border and the rest of the page. But how?
    3. I wish to make some of my menu items non clickable. I managed to have them not link to a page but when clicked it refreshes the current page. I want it to be completely numb. But how?
    4. I would like to have the current page, show up in a different color in the menu, so people can see which page they are on. But how?

    Any code & umbraco geniuses who can help? 🙂

  • Søren Kottal 419 posts 2557 karma points MVP c-trib
    Jan 07, 2019 @ 19:01
    Søren Kottal

    Hi Gitte

    1. You can remove it from the view that is generating it. You probably have a Master-view (look in Templates in Umbraco, or Views folder on the filesystem. The top green menu is probably a partial view referenced in there. Look for @Html.Partial() and try to locate the correct view. Partial Views can be edited through Umbraco (in Partial Views in the Settings section of Umbraco), or in the filesystem (look for the folder Views/Partials).

    2. You need to change the css for this part, I can see there is several css files referenced in the site, so you get to choose which one is relevant :). The markup is probably located in either a Masterview, or a partial referenced from there.

    3. This depends on how your navigation is built, but if you change the tags from <a> to <span> they will not try to redirect the user.

    4. Again this depends on how your navigation is built. A typical pattern is that the navigation is a list of child pages to a specific page. It could look something like this:

    @foreach (var page in Model.Children()) { <a href="@page.Url">@page.Name</a> }

    You can test if one of the pages in the loop is active by doing something like this: Model.IsDescendantOrSelf(page) or Model.Id == page.Id

    The first one returns true, if the visited page is either a descendant of the current, or IS the current page. The second one returns true, only if the visited page is the current page.

    So bringing this back to the code would be like:

    @foreach (var page in Model.Children()) 
      if (Model.IsDescendantOrSelf(page))
        <a href="@page.Url" class="active">@page.Name</a>
      else {
        <a href="@page.Url">@page.Name</a>   

    I know this probably doesn't apply 100% to your needs, but I hope it gets you closer to what you want :)

  • Gitte Falkenberg 7 posts 96 karma points
    Jan 17, 2019 @ 14:09
    Gitte Falkenberg

    Thx Søren. Kind of you to answer.

Please Sign in or register to post replies

Write your reply to: