protected virtual void AddIncludeToOutput(HtmlTextWriter output, ThemeItem themeItem) { output.AddAttribute(HtmlTextWriterAttribute.Href, themeItem.FileLocation.Raw.Trim()); output.AddAttribute(HtmlTextWriterAttribute.Rel, "stylesheet"); output.AddAttribute(HtmlTextWriterAttribute.Type, "text/css"); output.RenderBeginTag(HtmlTextWriterTag.Link); output.RenderEndTag(); }
protected override void DoRender(HtmlTextWriter output) { var blog = ManagerFactory.BlogManagerInstance.GetCurrentBlog(); if (blog != null && !string.IsNullOrEmpty(blog.Theme.Raw)) { var themeItem = blog.Theme.Item; var currentTheme = new ThemeItem(themeItem); AddIncludeToOutput(output, currentTheme); } }