Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Response.AddHeader("X-COMPRESS-HAS-PLACEHOLDERS", "1")
- If String.IsNullOrEmpty(Me.CurrentSite.LayoutPath.Trim()) Then ' If this isnt using a theme
- Response.AddHeader("X-COMPRESS-HAS-THEME", "0")
- ' TODO: could be cleaned up using CurrentSite.CompressCSS if I had a working code gen
- If Not SW.Core.Site.ShouldCompressCSS(Me.CurrentSite.SiteId) Then ' If this should not compress
- Response.AddHeader("X-COMPRESS-SHOULD-COMPRESS", "0")
- phNormalCSS.Visible = True
- phCompressedCSS.Visible = False
- Else ' If this should compress
- Response.AddHeader("X-COMPRESS-SHOULD-COMPRESS", "1")
- phNormalCSS.Visible = False
- phCompressedCSS.Visible = True
- Dim ltlLink As New LiteralControl(String.Format("<link href=""SiteFiles/{0}/css/compressed.css"" rel=""stylesheet"" type=""text/css"" />", Me.CurrentSite.SiteId))
- phCompressedCSS.Controls.Add(ltlLink)
- End If
- Else ' If this is using a theme
- Response.AddHeader("X-COMPRESS-HAS-THEME", "1")
Add Comment
Please, Sign In to add comment