Hi,
I have a website which uses themes. Depending on the url (if it is A.something.com or B.something.com, where A and B represent clients), I will load a different theme. The intention is to use one codebase for different clients. I have an app_themes folder, several themes inside, for different clients, and different CSS files for each theme (for business reasons the CSS file is the same for each theme, but duplicated). So my code looks like this:
Public Overrides Property StyleSheetTheme() As String
Get
Dim myHost As String = Request.Url.Host
Return myHost
End Get
Set(ByVal value As String)
End Set
End Property
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
If Request.Url.Host.Contains("Savills") Then
Page.Theme = "Savills"
ElseIf Request.Url.Host.Contains("localhost") Then
Page.Theme = "localhost"
ElseIf Request.Url.Host.Contains("test.concepglobal.com") Then
Page.Theme = "test.concepglobal.com"
ElseIf Request.Url.Host.Contains("concepglobal") Then
Page.Theme = "concepglobal"
End If
End Sub
My app_themes folder structure:
App_Themes:
localhost:
Default.css
Savills
Savills.css
However, everytime I load the site, the css is not picked up. So I don't get the h1 style I designed in the css (it is in there), but only the graphics specified in the aspx page.
My source when running the site:
(loading the site at that url).
Confusingly, there is another link to the same css:
What am I doing wrong?
Thanks