More in this section
Forums / Bugs & Issues / Horizontal navigation with tabs - preventing level 2 from always showing

Horizontal navigation with tabs - preventing level 2 from always showing

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Ryan
    Ryan avatar
    57 posts
    07 May 2013
    17 Jul 2013
    Link to this post
    I'm trying to create a horizontal navigation with a second level of child pages expanding under the first level. I'm getting most of what I can out of the OOTB horizontal navigation with tabs.

    The problem is, if I'm on a child page, that 2nd level of pages in the navigation stays open. I do not want this to stay open, but rather close (only expanding if the mouse is over it). I've attached a screenshot. Basically, if I'm on the "Resource Center" page or any of its children, I DON'T want the set of child pages to show.

    Is this possible with minimal customization? Thanks.
  2. Jen Peleva
    Jen Peleva avatar
    568 posts
    10 Nov 2016
    22 Jul 2013
    Link to this post
    Hi Ryan,

     This is a default behavior of the SiteMapNavigationTabStrip control (one of the views of the navigation control). On TabDataBound Selected = true is set to all tabs that are parents of the current page (including the current page), which expands them. What you can do is set a template to the default navigation (from the designer, as in the attached image) and on a later event set Selected to false for all tabs, which will collapse them. I have attached a sample template. Place it in your project and set the relative path to it in the Navigation control template path.

    Jen Peleva
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Narayanan
    Narayanan avatar
    1 posts
    25 Jun 2014
    07 Aug 2014 in reply to Jen Peleva
    Link to this post

    Hi Jen,

    Thanks for your solution. Now the menu layers are hidden on page load.

    But still there is issue on click each tabs. Menu layers not closing , when we click any where outside.

    Also when we open the two layers of menus and shift between the two tabs. Two layered menus which was opened before is not closing. Please advice.



3 posts, 0 answered