Horizontal navigation with tabs - preventing level 2 from al

Posted by Community Admin on 04-Aug-2018 13:55

Horizontal navigation with tabs - preventing level 2 from always showing

All Replies

Posted by Community Admin on 17-Jul-2013 00:00

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.

Posted by Community Admin on 22-Jul-2013 00:00

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.

Regards,
Jen Peleva
Telerik

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
[View:/cfs-file/__key/communityserver-discussions-components-files/297/09d8c7b2_2D00_4a7a_2D00_45b3_2D00_9f10_2D00_eda105f9aa79_5F00_tabStripnavControl.zip:320:240]

Posted by Community Admin on 07-Aug-2014 00:00

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.

Thanks,

Nat

This thread is closed