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

Forums / Sitefinity SDK / Navigation Widget Question

Navigation Widget Question

9 posts, 0 answered
  1. NimitV
    NimitV avatar
    68 posts
    Registered:
    06 Apr 2010
    13 Dec 2010
    Link to this post
    Hi,

    I am in the midst of migrating an existing site to SF 4.0 RC and cam accross a small issue. Their primary navigation is a tab strip so I decided to use the navigation widget in 4.0. This works well as I was able to apply my custom skin but I came across one issue.

    I'd like to have this widget open the sub items when the parent item is clicked and also navigate to the parent item. By setting the widget to open on click it works but does not navigate to the parent page.

    From here I aborted trying to use the prebuilt widget and used a radtabstrip in the template with a sitemapdatasource control but the sitemapdatasource control returns all of the pages including those specified to not show in navigation. It is also starting at the node "Pages".

    How would I get the prebuilt widget to function the way I need or be able to create a custom widget that filters out the pages that are not to be shown?

    Thanks,
    Steve 
  2. S. Webb
    S. Webb avatar
    36 posts
    Registered:
    28 Dec 2006
    14 Dec 2010
    Link to this post
    Do I need to iterate through the sitemap or is there a custom sitemap control in the SDK that I can bind to?

    Thanks,
  3. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    15 Dec 2010
    Link to this post
    Hi S. Webb,

    If the menu is set to open the sub menu items on click, how would you tell it to navigate to the parent page? Sub items are opened with click however, if they do not have child items.

    The SiteMapDataSource control needs to have an event added to it IsNodeAccessible in order to be able to tell if bound items can be accessed from the current user. . I have attached a sample user control which does this.

    Regards,
    Radoslav Georgiev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. NimitV
    NimitV avatar
    68 posts
    Registered:
    06 Apr 2010
    14 Jan 2011
    Link to this post
    Hi Radoslav,

    There seems to be another difference between 3.7 nav and 4.0 that I cannot get through. I have a work-around but requires me to change my URL structure and our SEO guys don't like that much.

    Most sites have more than one menu and in this case the structure is as follows:

    Pages
        -home
        -about us
        -products
            -prod 1
            -prod 2
        -how do i? (do not show in navigation)
            -install widget
            -fix this

    Now we have a main horizontal nav with drop downs across the top of the page which works great and excludes the "how do I?" menu item but what we would like is to have a secondary menu that just shows the "how do I?" items. So I created a custom widget with the radmenu and set the StartingNodeUrl to ~/how-do-i and the ShowStartingNode to false. When I do this I get a "You are not authorized to access this page" error. Where in 3.7 it would just display the list of sub items under "how do i?". Is there anyway to reproduce this behaviour?

    My work around requires me to create a structure like this:

        -how do i? (do not show in navigation)
            -how do I?
                -install widget
                -fix this

    In which case I point to the inner how do i item which is not hidden but then my url would be something like ~/how-do-i/how-do-i/installwidget

    Any help would be appreciated.

    Thanks,
    Steve
  5. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    17 Jan 2011
    Link to this post
    Hi SteveW,

    I am not quite sure that 3.x will allow this, setting it from the menu. If a parent page is set as non-navigable it will not be part of the SiteMap - this means that when you try to bind the menu to a non existing node you would get an error.

    Instead of binding your widget to a SiteMapDataSource control you can bind it to a collection of pages. you can retrieve the child pages of how do i page using the pages API (either fluent or native).

    Best wishes,
    Radoslav Georgiev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. NimitV
    NimitV avatar
    68 posts
    Registered:
    06 Apr 2010
    17 Jan 2011
    Link to this post
    Hi Radoslav,

    3.x does as  have done this probably 100 times but that's not the point. I understand you point that it is not added to the sitemap but how about the sub pages. if the sub pages are specified as being able to be navigated shouldn't they still show up. fnot then why allow people to change that setting instead of forcing inheritance?

    Thanks, I'll have to work with what I have.

    Take care,
    Steve
  7. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    17 Jan 2011
    Link to this post
    Hi SteveW,

    1. For hierarchical structures like ASP.NET TreeView or our RadTreeView control, if you remove the parent, there are no child elements. It does not matter whether you will hide the item or remove if from a given source.

    2. We allow people to change the ShowInNavigation property, because they could use it in a custom implementations.

    Regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. Daniel Lewis
    Daniel Lewis avatar
    27 posts
    Registered:
    23 Sep 2009
    08 Apr 2011
    Link to this post
    Ivan-

    In response to #2 - Show in Navigation only for custom implementations - this should be noted in SF4.
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    11 Apr 2011
    Link to this post
    Hello Daniel,

    ShowInNavigation is not inherited by child nodes. I am going to log a task about some inheritance, but here the situation is more complicate, because if you drag-drop the page under another node, we need to  change all settings, then the child pages of the dragged-dropped node  will get the settings of another parent which might have another settings.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
9 posts, 0 answered