Copied to clipboard

Flag this post as spam?

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


  • Sheik Naveed 22 posts 90 karma points
    Jun 20, 2022 @ 09:34
    Sheik Naveed
    0

    Navigation dropdown list

    Dear Team, Can Someone guide me on how to create a dropdown list in the navigation bar.

  • Ambert van Unen 175 posts 819 karma points c-trib
    Jun 20, 2022 @ 09:44
    Ambert van Unen
    0

    It might be easier for others to help you if you'd clarify your problem a bit.

    With the current information I'd simply refer you to https://www.w3schools.com/css/css_dropdowns.asp I guess ?

  • Sheik Naveed 22 posts 90 karma points
    Jun 20, 2022 @ 10:59
    Sheik Naveed
    0

    Dear Ambert, We need to know how can we create a structured navigation menu. For example.

    • About us
      • Our Team
      • Leadership
    • Reading Room
      • News
      • Blog

    I have created dynamic navigation, it only display the main menu, which is About us and Reading Room

  • Ambert van Unen 175 posts 819 karma points c-trib
    Jun 20, 2022 @ 11:04
    Ambert van Unen
    0

    You could add something like this to your existing loop for the menu items .Just check if it has childs, and if so, render some extra HTML:

    if(item.Children() > 0){
        <ul>
            @foreach(var child in item.Children())
            {
                <li><a href="@child.Url">@child.Name</a></li>
            }
        </ul>
    }
    
  • Sheik Naveed 22 posts 90 karma points
    Jun 20, 2022 @ 11:15
    Sheik Naveed
    0

    Dear Ambert, We tried this. The issue is that.

    News will have page created from template which will display the individual news. For example: News will have same template in News 1 News 2 (Its a child for News Template)

    But for About us, For example: Out team will have different design Leadership will have different design.

  • Ambert van Unen 175 posts 819 karma points c-trib
    Jun 20, 2022 @ 11:19
    Ambert van Unen
    1

    Designs have nothing to do with this right? Just your structure of the site in the Content section.

    Please try to put all required info in the main post, as we can't magically guess your configuration / things you ran into :-)

  • Sheik Naveed 22 posts 90 karma points
    Jun 25, 2022 @ 07:13
    Sheik Naveed
    0

    Thanks, we were able to create a navigation dropdown list

Please Sign in or register to post replies

Write your reply to:

Draft