include css files in master page from Theme folder - Front- & Back-End Development - Front- & Back-End Development - Progress Community
 Front- & Back-End Development

include css files in master page from Theme folder

  • include css files in master page from Theme folder
  • Hello,

    I want to manually add a css link to a master page. I follow the instructions as described here in the documentation for creating the folder structure. The following folders are created:

    • App_Data\Sitefinity\WebsiteTemplates\MyTemplate\App_Master
    • App_Data\Sitefinity\WebsiteTemplates\MyTemplate\App_Themes\MyTheme\Global
    • App_Data\Sitefinity\WebsiteTemplates\MyTemplate\App_Themes\MyTheme\Images
    • App_Data\Sitefinity\WebsiteTemplates\MyTemplate\App_Themes\MyTheme\Css

    I will be creating more than one theme. The documentation also describes that css files in the Css folder will not be included automatically. Now I want to add a css link to a master page from the theme that is selected in Sitefinity. I don't want to set the absolute path to the file.

    Is it possible to set the url of the css file to point to file in the selected Theme?


  • Hi Arjan,

    The Themes folder will be applied once you properly register your theme and apply it to your template via the backend. This will compress all css files into a single combined script and add all styles to your pages accordingly. You need not specify all of your files with absolute paths in the template, only when registering the theme.

    Ivan D. Dimitrov
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items