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

Forums / General Discussions / Tree View Navigation

Tree View Navigation

4 posts, 0 answered
  1. Anthony
    Anthony avatar
    108 posts
    Registered:
    29 Sep 2008
    26 Apr 2011
    Link to this post
    This may be a very basic question...

    I have many pages on my site and I am trying to set up a vertical navigation using the built in navigation control.

    I have a structure similar to below:

    Area 1
    - Dept 1
    -- Section 1-1
    -- Section 1-2
    -- Section 1-3
    -Dept 2
    -- Section 2-1
    -- Section 2-2
    -- Section 2-3

    Area 2
    - Dept 1
    -- Section 1-1
    -- Section 1-2
    -- Section 1-3
    -Dept 2
    -- Section 2-1
    -- Section 2-2
    -- Section 2-3

    I have created a MasterPages for Dept level pages that will be used on all dept pages and child pages.  I am creating a secondary navigation for Dept level and would like to use the vertical navigation control to add the dept page as well as the section pages underneath.

    When I use the built in navigation control and select the vertical or tree view menu I can select to display the children of certain page, but that does not include the parent page.

    Is there any way to add just the parent page and its children to the menu using the navigation control?  Another words have the control display:
    Dept 1
    Section 1-1
    Section 1-2
    Section 1-3


    Thanks. 

    Anthony

  2. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    08 Dec 2016
    27 Apr 2011
    Link to this post
    Hello Anthony,

    Please refer to the screenshot Navigation.png if this is the navigation structure you want to achieve.
    Refer to the Navigation_property.png "1" to to confirm you want the navigation to display the last parent page or all the parent pages above the current.
    If you want to display not all parent pages above the current page select "All Pages under particular page" property of the navigation where you can select Area 1 page  and so the Dept 1 page will be shown above the selected child pages.
    Using "All Pages under particular page" property of the navigation widget will achieve the navigation display:
    Dept 1
    Section 1-1
    Section 1-2
    Section 1-3

    Please feel free to write back if you encounter any more problems.

    Regards,
    Stanislav Velikov
    the Telerik team

  3. Anthony
    Anthony avatar
    108 posts
    Registered:
    29 Sep 2008
    27 Apr 2011
    Link to this post
    That is really similar to what I want, but when I do that I also get Dept 1 information as well when selecting all pages under Area 1.  I would like to get just Dept 2 and all of its sub pages without getting Dept 1 as well.

    It needs to be a "this page AND all of its child pages" without showing the siblings of the Dept pages.

    I would show you but I just upgraded to 4.1 and am now getting an error when I try to get into the Page Templates.
    "Object reference not set to an instance of an object."

    This is my page structure on my test site.

    I am trying to get the menu to show Training 1 and its child pages without showing Training 2, Training 3, etc...  as well.

    Thanks.

    Anthony

  4. Stanislav Velikov
    Stanislav Velikov avatar
    1113 posts
    Registered:
    08 Dec 2016
    28 Apr 2011
    Link to this post
    Hello Anthony,

    I understand what kind of functinality you want to achieve. You can do the collapsing of only one node of your navigation tree by allowing collapsing when editing a navigation widget and you will get this result ( see tree_navigation_collapsing.png). The problem with that is when you select a child page the navigation looses its current state and becomes non expanded. You need to save the state state of that navigation in session for example because when you are clicking on child links they cause postback and the control state is lost.

    You may find it useful to consider using RAD Tree View control which comes with the Sitefinity installation. An online demo is available here which will demonstrate its capabilities which in my opinion you are trying to achieve. Here is a link to the TreeView control documentation. Also this topic in the documentation will help you disables PostBacks because the item navigate to the particular URL rather than posting back and loose state.
     
    Best wishes,
    Stanislav Velikov
    the Telerik team

4 posts, 0 answered