Master page update inline header?

Quang Lai asked on May 4, 2016 16:03

I inherited an existing Kentico project, and the previous developers managed to insert stylesheet links in the master page template, but we now want to remove it. It's not part of the Header textarea itself, but above it. See screentshot below:

Image Text

I've looked in ~/CMSPages/PortalTemplate.aspx.cs and it's not being added in the tags.Text/HeaderTags section of the code. I've tried to search through the possible *.ascx files but nothing matches. The Site settings also list common as the default stylesheet which is properly showing up.

So I'm perplexed at how the extra owl.* css links were inserted by the previous developers, and how to remove it.

Unfortunately they are not available for assistance and so I'm turning to these forums.

Correct Answer

Felix Planjer answered on May 4, 2016 16:17

I think this is due to the fact that those css files exist in the common theme and are therefore automatically added. Remove the css files from the App_Themes/common folder (or change the extension to something other that .css) to remove them.

0 votesVote for this answer Unmark Correct answer

Recent Answers

Brenden Kehren answered on May 4, 2016 16:23

By default IIS includes any .css files which are part of that theme. Since the site's code name is common by default the theme is common. You will want to physically remove those css files out of /App_themes/common. What I typically do is add them in the CSS Stylesheets app so I can have full control over when they get added and any minimization and caching out of Kentico.

0 votesVote for this answer Mark as a Correct answer

Quang Lai answered on May 4, 2016 16:39

Thanks guys, you were both correct (unfortunately I can't mark both your answers as the correct one). I was afraid to delete the files until I was able to figure out how to remove the linking in the master page, but it turns out, deleting the physical files was the solution.

0 votesVote for this answer Mark as a Correct answer

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