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

Forums / Developing with Sitefinity / Querying a Page by URL

Querying a Page by URL

3 posts, 1 answered
  1. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    17 Apr 2013
    Link to this post
    I'm trying to modify a bunch of pages (content and properties) based on CSV data. The only "anchor" I have is the full path to the page.

    Given "/here-is/the-page-i-want", how do I get it?

    Drawing a complete blank :/
  2. Tim
    Tim avatar
    258 posts
    Registered:
    22 Jun 2011
    18 Apr 2013 in reply to Tim
    Link to this post
    In case anyone else is wondering, I ended up just doing this:

    var page = pageManager.GetPageNodes().ToList().FirstOrDefault(x => x.GetFullUrl() == url);

    ToList() isn't ideal but it won't be used in production so... :)
    Answered
  3. Victor Velev
    Victor Velev avatar
    1345 posts
    Registered:
    06 Jul 2015
    22 Apr 2013
    Link to this post
    Hello Tim,

    Thank you for sharing the information with the community! I am sure that it will be useful to other users as well!

    Kind regards,
    Victor Velev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
3 posts, 1 answered