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

Forums / Bugs & Issues / StartingNodeOffset doesn't work when used in a template

StartingNodeOffset doesn't work when used in a template

2 posts, 0 answered
  1. Bob Howard
    Bob Howard avatar
    22 posts
    Registered:
    06 Jan 2008
    12 Jan 2008
    Link to this post
    I found a strange issue where dropping a SitePanelBar on a template doesn't display anything if the StartingNodeOffset is set to 1, but if you drop the control on a normal page, it will show its children.  Hardcoding the SitePanelBar in a masterpage also works.
  2. Sonya
    Sonya avatar
    231 posts
    Registered:
    24 Sep 2012
    14 Jan 2008
    Link to this post
    Hi Bob Howard,

    The SitePanelBar shows the hierarchy of the current node (starting from it), while the StartingNodeOffset property sets the level of this hierarchy from which to start displaying the pages. Therefore, adding the SitePanelBar to the template alone does not guarantee that the hierarchy will be displayed. This depends also on the StartingNodeOffset property - if the current node has a level that is included in this property, then the SitePanelBar will display it. If not, the SitePanelBar will not be displayed.

    Let me give you an example - let us assume we have the following page hierarchy and that we have added a SitePanelBar to the template which is the default one for each page:
    • Page 1
      • Page 1.1
        • Page 1.1.1
      • Page 1.2
    • Page 2
      • Page 2.1
      • Page 2.2
    • Page 3
    If the StartingNodeOffset is 0, all pages will have a SitePanelBar.
    If the StartingNodeOffset is 1, the following pages will have a SitePanelBar: Page 1 and all its children, Page 2 and its child.
    If the StartingNodeOffset is 2, the following pages will have a SitePanelBar: Page 1 and all its children.

    This is the logic. In other words, it is against that logic to have a SitePanelBar in the template when the StartingNodeOffset is other than 0 because there is no current node to display its hierarchy.

    Hope this helps.

    Best wishes,
    Sonya
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
2 posts, 0 answered