More in this section

Forums / Developing with Sitefinity / Get the current applied theme

Get the current applied theme

2 posts, 0 answered
  1. Mike
    Mike avatar
    221 posts
    19 Aug 2008
    14 Oct 2008
    Link to this post
    Is there a way (accessing the api) to get the current theme being applied tot he site so that i can direct my custom control resources to the themes folder being used?

  2. Sonya
    Sonya avatar
    231 posts
    24 Sep 2012
    20 Oct 2008
    Link to this post
    Hi Nugs,

    If you wanted to find the theme for the current page, you could get the current page and then access its theme by the Theme property.

    Since you want to know the theme applied in the whole site, you will need to get all pages and take their themes. For this purpose, you will need to create an instance of CmsManager class. Then, get all pages and get their themes:
    CmsManager manager = new CmsManager(); 
    IList pages = manager.GetPages(); 
    foreach (ICmsPage page in pages) 

    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered