1
votes

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?

2

2 Answers

3
votes

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"))`
0
votes

After I created the MVC widget, which I included these files in my razor view.

@using System.Web.Mvc;
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@using Telerik.Sitefinity.Modules.Pages;

Then went into Sitefinity Backend > Administration > Backend Pages > find the page you want to have the Backend Default Template > Actions > Change Template > Select "Default Backend Template".

Please Note: I am using a multi-site so I had to allow access to the specific site I was currently working on to appear in my Backend template list.

To allow a specific page go to Sitefinity Backend > Administration > Backend Pages > Manage Templates > Actions > Share with