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

Forums / Designing with Sitefinity / Affiliates and white labeling

Affiliates and white labeling

3 posts, 0 answered
  1. Peter
    Peter avatar
    3 posts
    Registered:
    20 Sep 2007
    09 Jan 2008
    Link to this post
    Hi,

    We are considering purchasing Sitefinity but are unsure if we are able to do the following.

    At present we have a custom website which gets themed based on the URL (querystring parameter).  Is there some way to pragmatically change skins and themes based on querystrings?

    Thanks!
  2. Tihomir
    Tihomir avatar
    53 posts
    Registered:
    24 Sep 2012
    11 Jan 2008
    Link to this post
    Hello Peter,

    The goal you need is achievable with Sitefinity but you will need to do some custom changes. To programmatically set themes, please follow these steps:
    1. Create a new class in the App_Code folder that inherits from Telerik.Cms.Web.InternalPage and override the OnPreInit method. Enter your logic in this method.
      public class CustomPage : Telerik.Cms.Web.InternalPage  
      {  
          protected override void OnPreInit(EventArgs e)  
          {  
              base.OnPreInit(e);  
              this.Theme = Request.QueryString["theme"];  
          }  
      }  
       
    2. Replace the declaration of the InternalPage class with the name of your newly created class in the following file ~/Sitefinity/cmsentrypoint.aspx. The file should look like this:
      <%@ Page Language="C#" MasterPageFile="~/App_Master/Dummy.master" Inherits="CustomPage" %> 
       
    Do let us know if you need any further assistance.

    Regards,
    Tihomir
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Peter
    Peter avatar
    3 posts
    Registered:
    20 Sep 2007
    12 Jan 2008
    Link to this post
    Thank you,

    Looks easy enough!  I'll try it out when I start to play with the trial.
Register for webinar
3 posts, 0 answered