Disabling SitefinityStyleSheetManager?
How can I disable this in the Page.Items collection? It's messing with how/when styles defined in the <head /> tag are being rendered and need to disable it. Thanks.
Hello Ryan,
Could you please provide more information about the problem you have faced with the StyleSheetManager in order to propose you the correct solution?
In addition, you could set the combining the style sheets to 'False' under:
Administration > Settings > Advanced > Pages and set "Combine style sheet resources" to 'False'
- or -
Create your own Master Page without loading the RadStyleSheetManager.
Regards,
Svetoslav Manchev
Telerik
I used JustDecompile to decompile and see how this thing was working. The problem is I needed fine control over when my stylesheets loaded and in which order. Since the Responsive Design has a bug where stylesheet files are applied across everything ruleset (this is a noted bug), I had to resort to my own code. Basically, I needed my desktop and mobile stylesheets to load in this particular order and the default CSS control widget (which used SitefinityStyleSheetManager) was forcing stylesheets I defined in it right inside the end of the <head /> tag, disallowing me to add my mobile stylesheet after the one from this control was loaded.
The order I needed was:
1. Base.css (in master page)
2. Interior.css (loaded in the CSS widget on my Interior template in SF, used by sub-pages)
3. Mobile.css, which needed to be loaded at the very end so that transformations could occur.
I ended up writing my own to bypass the built-in SitefinityStyleSheetManager, as well as load the stylesheets on Page_Load instead of Page_PreRender, thus allowing my master pages to give more control over when certain stylesheets loaded.
Sorry if this sounds vague. No need for a solution at this point as custom code (as always...) solved my problems. Thanks.