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

Forums / Developing with Sitefinity / 2 domains, 1 physical directory, 1 database, different themes

2 domains, 1 physical directory, 1 database, different themes

3 posts, 1 answered
  1. JD
    JD avatar
    5 posts
    Registered:
    04 Oct 2010
    04 Oct 2010
    Link to this post
    We are still evaluating Sitefinity, have built 1 website and are impressed.  However, we are now trying to achieve a setup of 2 websites that will only differ by domain name and theme.  All other content will be the same.  I've read through numerous posts centered around having some shared and some separate content using the provider model but, since we're talking about pages and not modules as well as using 1 physical directory, the more I look through everything, it appears we should do the following:

    1) Create a custom class that inherits from CmsProvider.
    2) Create a custom class that inherits from Telerik.Cms.Data.PageBase and override the Theme property to determine theme by domain.
    3) Have our provider use functionality from DefaultProvider but only "override" the functions that return some form of Page to return our custom class derived from PageBase.
    4) Modify web.config to use our custom CmsProvider.
    5) Place our images in the Themes folder that corresponds to the dynamic theme we will load based on domain name.

    I'm still REALLY new to Sitefinity and CMS software in general, so I'm probably making this more complicated than necessary.  Am I even close to being on the right track?

    Secondly, since 4.0 is getting closer, will it have a simpler solution for achieving this out-of-the-box?  If so, we may wait until then.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    05 Oct 2010
    Link to this post
    Hello JD,

    Form what you are saying it looks like you will have only different themes. You can achieve this by overriding InternalPage class and its method GetTheme.
    If you want to have two different SiteMaps for both the domains you can use this option Domain Page Mapping

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. JD
    JD avatar
    5 posts
    Registered:
    04 Oct 2010
    11 Oct 2010
    Link to this post
    I was actually able to find the "GetTheme" post just before Ivan posted the reply to this and it works perfectly.  For those who run across this and are interested in how to make the images change by Url as well, after implementing the change to override GetTheme(), see this post about theme images.
Register for webinar
3 posts, 1 answered