Search code examples
csssitefinitysitefinity-10

Sitefinity MVC - include backend styling


I have added a backend page and a widget within that. I wanted to match styling up to the other backend pages for consistency. A good part of this is a table display a bunch of data that I decorated with k-grid as seen on my modules page.

However, this style is not immediately available on my newly created page - it's not anywhere in the CSS accessed by that page. I also couldn't find "k-grid" anywhere in my entire sitefinity solution. There does not appear to be a CSS widget on the modules page, and I'm using the same template.

Where is this css/how do I include this css on my new backend page?


Solution

  • k-grid class is present in this .css files inside backend:

    • Telerik.Sitefinity.Resources.Themes.Light.CSS.Layout.css
    • Telerik.Sitefinity.Resources.Themes.Light.CSS.Colors.css
    • Telerik.Sitefinity.Resources.Themes.Light.Styles.Grid.css
    • Telerik.Sitefinity.Resources.Themes.Light.Styles.TreeviewTable.css

    You can include this files in your MVC widget like that:

    @using Telerik.Sitefinity.Frontend.Mvc.Helpers;
    @Html.StyleSheet(Url.EmbeddedResource("Telerik.Sitefinity.Resources.Reference", "Telerik.Sitefinity.Resources.Styles.all.css"))`