Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): General Discussions > IRootPage - cmsManger.GetRootPage()

IRootPage - cmsManger.GetRootPage()

  • Eric avatar

    Posted on Mar 9, 2010 (permalink)

    Hello,

    I am using some code to get the page name.

    IPage

     

    page = cmsManager.GetPage(currentPageID);
    page.Name;

     


    My problem is I have 3 pages name the same thing but in different page groups. 

    HR/FAQ.aspx
    PR/FAQ.aspx
    Schedules/FAQ.aspx

    Is there a way to get the page group of these 3 pages?  Will GetRootPage do the trick? 

    Thanks. 

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Mar 9, 2010 (permalink)

    Hi Eric,

    You can use page ID which is GUID. The HR, FR and Schedules are parent pages for each FAQ page. You could use page.ParentID to get HR, FR and Schedules. GetRootPage method will not  do the trick.

    Sincerely yours,
    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.

    Reply

  • Eric avatar

    Posted on Mar 9, 2010 (permalink)

    I am not seeing page.ParentID


    Here is my code.

    Telerik.Cms.Web.

    ICmsUrlContext pageKey = ( Telerik.Cms.Web.ICmsUrlContext)this.Context.Items[Telerik.Cms.Web.UrlHelper.CmsPageKey];

     

     

    Guid currentPageID = pageKey.PageID;

     

     

    var cmsManager = new CmsManager();

     

     

    IPage page = cmsManager.GetPage(currentPageID);

     


    I attempted page.  and do not see ParentID in the intellisense.  Also tried pageKey.

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Mar 9, 2010 (permalink)

    Hello Eric,

    You should have used ICmsPage object. Also, RadEditor supports FormatCodeBlock that you can use when you paste any code.

    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.

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): General Discussions > IRootPage - cmsManger.GetRootPage()