The following sample code shows how you can get a CSS stylesheet as a CssStylesheetInfo object:
[C#]
using CMS.SiteProvider;
...
// Get stylesheet object by ID CssStylesheetInfo csi = CssStylesheetInfoProvider.GetCssStylesheetInfo(1);
// Get stylesheet object by stylesheet name CssStylesheetInfo csi2 = CssStylesheetInfoProvider.GetCssStylesheetInfo("CorporateSite"); |
The following sample code shows how you can get a DataSet containing CSS stylesheets:
[C#]
using System.Data; using CMS.SiteProvider; using CMS.CMSHelper;
...
string siteName = CMSContext.CurrentSiteName; string where = ""; string orderBy = ""; string columns = ""; int topN = 10 ;
// Get dataset of stylesheets according to the given parameters DataSet ds2 = CssStylesheetInfoProvider.GetCssStylesheets(siteName);
DataSet ds3 = CssStylesheetInfoProvider.GetCssStylesheets(where, orderBy);
DataSet ds4 = CssStylesheetInfoProvider.GetCssStylesheets(where, orderBy, topN);
DataSet ds5 = CssStylesheetInfoProvider.GetCssStylesheets(where, orderBy, topN, columns);
// Get dataset of all stylesheet objects DataSet ds = CssStylesheetInfoProvider.GetAllCssStylesheets(); |
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_getting_css_stylesheet_data.htm