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

Forums / Developing with Sitefinity / Change Home page programaticaly

Change Home page programaticaly

2 posts, 0 answered
  1. Pierre
    Pierre avatar
    433 posts
    Registered:
    16 Feb 2006
    24 Mar 2009
    Link to this post
    Hi,

    Some way to change Default.aspx page declared as Home using some custom logic like hours pairs and hours impairs or using some timing or serving after x connections.

    Thanks.
  2. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    24 Mar 2009
    Link to this post
    Hello Pierre,

    You could set the home page with the following CmsManager methods:

    SetHomePage(Guid)  
    SetHomePage(ICmsPage)

    The first accepts the guid of the page, while the second - an ICmsPage object. You can get such object like:

    CmsManager m = new CmsManager();
    ICmsPage mypage = m.GetPage(some_page) as ICmsPage;

    As for the schedule, I have already provided you an example on this some months ago.

    All the best,
    Georgi
    the Telerik team

    Check out Telerik Trainer , the state of the art learning tool for Telerik products.
2 posts, 0 answered