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

Forums / Developing with Sitefinity / How to browse to a next or previous page within a page group?

How to browse to a next or previous page within a page group?

2 posts, 0 answered
  1. Tys
    Tys  avatar
    8 posts
    Registered:
    04 Mar 2009
    26 Mar 2010
    Link to this post
    Hi Everyone,

    I'm creating some page groups, with a variable number of pages in it and i dont want to show a submenu for these pages. What i want to do is create 2 buttons, < prev  |  next >  so the users can use these to navigate within the page group. I only thing is, i dont have a clue about how to do this :)
    Does anyone have some ideas or code which i can use to accomplish this?

    Best regards,
    Tys
  2. Tys
    Tys avatar
    15 posts
    Registered:
    17 Feb 2009
    26 Mar 2010
    Link to this post
    I've found the solution.

    Telerik.Cms.Web.CmsSiteMapNode siteNode = (Telerik.Cms.Web.CmsSiteMapNode)SiteMap.Provider.CurrentNode;
    int nodeCount = 0;
    foreach (Telerik.Cms.Web.CmsSiteMapNode childNode in siteNode.ParentNode.ChildNodes)
    {
       //doing some checks here.. by comparing the current siteNode to the childNodes found in this loop..
       //and then i redirect to a previous or next page by using the counter
       nodeCount++;
    }
2 posts, 0 answered