include css files in master page from Theme folder

Posted by Community Admin on 05-Aug-2018 07:22

include css files in master page from Theme folder

All Replies

Posted by Community Admin on 12-Nov-2014 00:00

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?

Thanks,
Arjan

Posted by Community Admin on 17-Nov-2014 00:00

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.

Regards,
Ivan D. Dimitrov
Telerik

 
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
 

This thread is closed