Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Dynamically loading the CSS style sheet from File structure. View modes: 
User avatar
Member
Member
rakeshtgupta-gmail - 11/14/2011 6:28:20 PM
   
Dynamically loading the CSS style sheet from File structure.
Hello,

We have a application to personalize themes of a particular logged in user(different style sheets will be loaded according to selection of User). Presently we are loading the Style sheet from DB but we want to place the style sheets in the folder structure and load from there dynamically according to users interest.
I was wondering is their any easy way to set and load the style sheets from the folder structure dynamically?
Currently we are using Kentico V5.5 R2.

Thanks and Regards,
Rakesh

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 11/15/2011 5:54:52 AM
   
RE:Dynamically loading the CSS style sheet from File structure.
Hello,

We are setting the Page.Theme property in the PreInit(..) method according to the stylesheet:

...
this.Page.Theme = csi.StylesheetName;
...

If you need to change this, you need to change this property in the PreInit method of the PortalTemplate.aspx.cs page according to your needs.

Best regards,
Boris Pocatko