+1-888-365-2779
Try Now
More in this section

Forums / Designing with Sitefinity / How to limit sitemenu to only be 2 levels deep

How to limit sitemenu to only be 2 levels deep

3 posts, 0 answered
  1. eraashishgupta
    eraashishgupta avatar
    50 posts
    Registered:
    26 Nov 2008
    04 Dec 2008
    Link to this post
    Hi on one of my masterpage inside my topnaviagtion template i am having sitemenu but the problem is that it shows me all the levels from my all the pages in my situation i am having many nested pages or groups but in the main naviagtion top site menu i want only the navigation to go at a depth of level 2 not to other pages so how can i achieve this.
    Please help
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    04 Dec 2008
    Link to this post
    Hi eraashishgupta,

    You could use MaxDataBindDepth property to set maximum levels to populate from the datasource:

    ~/Sitefinity/UserControls/Navigation35/SiteMenu.ascx
    <asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="false" /> 
    <telerik:RadMenu ID="RadMenu1" runat="server" MaxDataBindDepth="2" DataSourceID="SitemapDataSource1" OnItemDataBound="RadMenu1_ItemDataBound"
    </telerik:RadMenu> 

    To achieve this through Sitefinity interface, follow the instructions below:

    1. Click Edit to open SiteMenu property window.
    2. Expand section Misc and click Edit button next to Menu field - RadMenu property window opens.
    3. Expand the
    Data section and type 2 for MaxDataBindDepth property.
    5. Click I'm done to save the changes.

    Do let us know if this helps.

    Kind regards,
    Pepi
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. eraashishgupta
    eraashishgupta avatar
    50 posts
    Registered:
    26 Nov 2008
    04 Dec 2008
    Link to this post
    Thanks Pepi for help but i already figured it out
    But thanks again for quick response
    Aashish

Register for webinar
3 posts, 0 answered