More in this section

Forums / General Discussions / Parent ID of a page ?

Parent ID of a page ?

2 posts, 0 answered
  1. Jon
    Jon avatar
    41 posts
    20 Oct 2010
    11 Feb 2011
    Link to this post
    How do I get the parent ID of a page if I have the page title.. For example, if I had a page named TestPage. How would I get the parent ID of TestPage ? Code please ..

    Thanks in advance,


  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    12 Sep 2017
    15 Feb 2011
    Link to this post
    Hi Jon,

    First you need to get the PageNode object. Then you can call PageNode.Parent that returns the parent PageNode.

    sample code

    var pg = App.WorkWith().Pages().Where(p => p.Title == "somevalue").Get().SingleOrDefault();
    var parent = pg.Parent;

    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
2 posts, 0 answered