Repeted stylesheet in Master Page.

Mateusz Żebrowski asked on February 17, 2015 07:32

Why sometimes Kentico repet link to css in site masterpage? I mean it sometimes writes something like that:

<link href="/CMSPages/GetResource.ashx?stylesheetname=Style" type="text/css" rel="stylesheet"/>
<link href="/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Site_name/Style.css" type="text/css" rel="stylesheet"/>

Correct Answer

Brenden Kehren answered on February 17, 2015 13:44

Kentico does not automatically add any stylesheets without some sort of user intervention. If there are physical .css files in the app_themes directory, by default IIS will add them if it is the theme you're using. Kentico will only place a stylesheet in the master page if you select a default stylesheet for the site.

The way to get around this is to place all your stylesheets in the database under different code names, then place them in order using a HEAD HTML webpart.

1 votesVote for this answer Unmark Correct answer

Recent Answers

Dawid Jachnik answered on February 17, 2015 12:12

Kentico automatically adds the css files, if any are placed in App_Themes/Stylesheet folder

3 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.