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

Forums / Developing with Sitefinity / Determine if page is set as Home?

Determine if page is set as Home?

2 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    07 May 2013
    Link to this post
    I have the node and data page objects, but I'm usure how to know if the page is marked as "Home" or not?
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    07 May 2013
    Link to this post
    Hello,

    The following piece of code will give you the home page ID (if in multysite you will get the home page for the current site):

    var homePageId = SystemManager.CurrentContext.CurrentSite.HomePageId;

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