Kentico CMS 7.0 Tutorial ASPX

App themes

App themes

Previous topic Next topic Mail us feedback on this topic!  

App themes

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

In some cases, you may leverage the built-in support for ASP.NET themes. You can use them to set styles for controls that do not have their own CSS class name, such as Datagrid, Calendar or web parts with complex dialogs (logon form, registration form, ...).

 

Themes must be defined in a folder located under the App_Themes directory. The name of this folder needs to be the same as the code name of the site's CSS stylesheet. So if you use the Green stylesheet on your site, your themes must be stored in the App_Themes\Green sub-folder.

 

Skins for your controls must be added to the Default.skin file under this folder. Here's an example of a skin for the CMSCalendar control / Calendar web part:

 

<cms:CMSCalendar Runat="server">
  <NextPrevStyle ForeColor="Red"></NextPrevStyle>
  <WeekendDayStyle BackColor="#E0E0E0"></WeekendDayStyle>
</cms:CMSCalendar>

 

The code above defines the appearance of the calendar control. You can see this control on the Events page of the sample Corporate Site.

 

 

 

Where should I store website design files?

 

It's recommended to store all images, flash movies and other resources that are part of the website design template in the App_Themes/<stylesheet code name> folder. This ensures that the files are exported together with the stylesheet if you deploy it to some other server.