Data Bind Style Sheet Path with Client Dependency Framework
Hi,
I have a theme that I am html theme that I am converting to master pages for my umbraco site. I added a top level "Site Settings" document type that has a drop down list property called "ThemeStyle". I have successfully created the drop down list with values like "Red", "Blue", "Green".
To change the theme color, you simply include /css/colors/STYLENAME.css, where STYLENAME is the value from the ThemStyle property on my Site Settings node. I now want to update my Main.master page to dynamically include this style sheet using the client dependency framework but I can't seem to get it to work, all of my non data bound scripts/styles load correctly.
I tried this and it does not work (ignore the fact that I am hard-coding the "colors/red.css" for now)
Does anyone know how to do this? Also, assuming that we get this working, how would I get the "ThemeStyle" value to databind to assuming that it is on the top level node of my web site?
Data Bind Style Sheet Path with Client Dependency Framework
Hi,
I have a theme that I am html theme that I am converting to master pages for my umbraco site. I added a top level "Site Settings" document type that has a drop down list property called "ThemeStyle". I have successfully created the drop down list with values like "Red", "Blue", "Green".
To change the theme color, you simply include /css/colors/STYLENAME.css, where STYLENAME is the value from the ThemStyle property on my Site Settings node. I now want to update my Main.master page to dynamically include this style sheet using the client dependency framework but I can't seem to get it to work, all of my non data bound scripts/styles load correctly.
I tried this and it does not work (ignore the fact that I am hard-coding the "colors/red.css" for now)
I even tried to call this during Page_Load for the master page.
This code works fine
Does anyone know how to do this? Also, assuming that we get this working, how would I get the "ThemeStyle" value to databind to assuming that it is on the top level node of my web site?
Thanks in advance,
Justin
I don't know why I can't edit my post, but I meant to say:
I have a new html them that I am converting to masterpages instead of I have a theme that I am html theme that I am converting to master pages
is working on a reply...