Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. Response.AddHeader("X-COMPRESS-HAS-PLACEHOLDERS", "1")
  2. If String.IsNullOrEmpty(Me.CurrentSite.LayoutPath.Trim()) Then ' If this isnt using a theme
  3. Response.AddHeader("X-COMPRESS-HAS-THEME", "0")
  4. ' TODO: could be cleaned up using CurrentSite.CompressCSS if I had a working code gen
  5. If Not SW.Core.Site.ShouldCompressCSS(Me.CurrentSite.SiteId) Then ' If this should not compress
  6. Response.AddHeader("X-COMPRESS-SHOULD-COMPRESS", "0")
  7. phNormalCSS.Visible = True
  8.  
  9. phCompressedCSS.Visible = False
  10. Else ' If this should compress
  11. Response.AddHeader("X-COMPRESS-SHOULD-COMPRESS", "1")
  12. phNormalCSS.Visible = False
  13.  
  14. phCompressedCSS.Visible = True
  15.  
  16. Dim ltlLink As New LiteralControl(String.Format("<link href=""SiteFiles/{0}/css/compressed.css"" rel=""stylesheet"" type=""text/css"" />", Me.CurrentSite.SiteId))
  17. phCompressedCSS.Controls.Add(ltlLink)
  18. End If
  19. Else ' If this is using a theme
  20. Response.AddHeader("X-COMPRESS-HAS-THEME", "1")
Add Comment
Please, Sign In to add comment