More in this section
Forums / Developing with Sitefinity / Determine if page is set as Home?

Determine if page is set as Home?

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
3 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    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
    01 Feb 2016
    07 May 2013
    Link to this post

    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;

    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
  3. Ross
    Ross avatar
    0 posts
    03 Mar 2016
    03 Jan 2017
    Link to this post
    if (SystemManager.CurrentContext.CurrentSite.HomePageId == Telerik.Sitefinity.Web.SiteMapBase.GetActualCurrentNode().Id)
        // homepage
3 posts, 0 answered