More in this section

Forums / Developing with Sitefinity / Creating a Sitemap that Shows All Pages

Creating a Sitemap that Shows All Pages

3 posts, 0 answered
  1. Nathan
    Nathan avatar
    7 posts
    Registered:
    16 Dec 2009
    03 Feb 2010
    Link to this post
    I'm need to create a sitemap user control that will show all pages even if the "Show in Navigation" property is set to false.  The control also needs to have the ability to exclude specific pages and hopefully page groups based on public properties. The reason I can't just set "Show in Navigation" to false for pages that shouldn't be shown in the sitemap is because I've got a navigation bar at the top of my master page that shouldn't show everything that the sitemap does.

    I've tried using a RadTreeView control, but I haven't been able to find a way to make it ignore the navigable property.

    Is there a fairly simple way to do this?

    Thanks.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    03 Feb 2010
    Link to this post
    Hi Nathan Lomax,

    You need to use CmsManager and GetPages method which returns IList. Then, bind the RadTreeView to this list and you will see that it is populate with all pages, not matter of the navigable value.

    manager = new CmsManager();
    IList AllPages = manager.GetPages();
    RadTreeView1.DataTextField = "MenuName";
    RadTreeView1.DataFieldID = "ID";
    RadTreeView1.DataFieldParentID = "ParentID";
    RadTreeView1.DataNavigateUrlField = "StaticUrl";
    RadTreeView1.DataSource = AllPages;
    RadTreeView1.DataBind();


    All the best,
    Ivan Dimitrov
    the Telerik team

    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Follow the status of features or bugs in PITS and vote for them to affect their priority.
  3. Nathan
    Nathan avatar
    7 posts
    Registered:
    16 Dec 2009
    03 Feb 2010
    Link to this post
    Thanks a lot, that works perfectly.  I was just over complicating it I guess.
Register for webinar
3 posts, 0 answered