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

Forums / General Discussions / IRootPage - cmsManger.GetRootPage()

IRootPage - cmsManger.GetRootPage()

4 posts, 0 answered
  1. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    09 Mar 2010
    Link to this post
    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. 

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Mar 2010
    Link to this post
    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.
  3. Eric
    Eric avatar
    40 posts
    Registered:
    10 Apr 2009
    09 Mar 2010
    Link to this post
    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.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    09 Mar 2010
    Link to this post
    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.
Register for webinar
4 posts, 0 answered