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

Forums / Developing with Sitefinity / Disabling SitefinityStyleSheetManager?

Disabling SitefinityStyleSheetManager?

3 posts, 0 answered
  1. Ryan
    Ryan avatar
    57 posts
    Registered:
    07 May 2013
    04 Apr 2014
    Link to this post

    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.

  2. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    29 Nov 2016
    08 Apr 2014
    Link to this post
    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
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
  3. Ryan
    Ryan avatar
    57 posts
    Registered:
    07 May 2013
    08 Apr 2014 in reply to Svetoslav Manchev
    Link to this post

    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.

3 posts, 0 answered