Hiding Kentico's default boostrap file on live site

Fabio Goto asked on June 26, 2018 08:48

Hi! I'm kinda new to Kentico CMS and, coming from a mostly PHP background, I've got almost to none experience with .net websites here.

I'm learning the basics because there's a job that kinda forces me to use it (since the company already got a license and has been using it) so I upped a VM and installed the free version to learn the basics.

I'm starting to get the hang of things using only the admin, and it's really nice and easy to use, but I'm having a small issue with two versions of Bootstrap appearing.

I'm using BS4 for my project, but Kentico keeps adding this stylesheet to the end of the <head> tag, even without being logged in:

<link href="/CMSPages/GetResource.ashx?stylesheetfile=/App_Themes/Default/bootstrap.css" type="text/css" rel="stylesheet">

Is there a way to omit this default one on the live site?

Thanks! :)

Correct Answer

Arindam Debnath answered on June 26, 2018 15:45

Hi Fabio,

No those references shouldn't add the tag. Could you go to the Sites app and check what your website code name is? If it's 'default', could you try changing to something else?

0 votesVote for this answer Unmark Correct answer

Recent Answers


Arindam Debnath answered on June 26, 2018 14:16 (last edited on June 26, 2018 14:16)

Hi Fabio, Kentico uses bootstrap for it's CMS but not for Live site. It shouldn't add any bootstrap reference automatically. By the looks of it, it seems this link is added to the master page - check the master page's layout header or any head html web part on your master or default page. Hope this helps.

0 votesVote for this answer Mark as a Correct answer

Fabio Goto answered on June 26, 2018 15:34

Hi, Arindam, and thanks for answering.

I checked the master page layout header on the layout editor and, besides Kentico putting the CSS assigned to the website, there's only that form field to add extra head code, which is empty. I'm also not using the Head HTML code in any place on it.

Does it have something to do with these two lines?

<%@ Control Language="C#" Inherits="CMS.PortalEngine.Web.UI.CMSAbstractLayout" %> <%@ Register Assembly="CMS.PortalEngine.Web.UI" Namespace="CMS.PortalEngine.Web.UI" TagPrefix="cms" %>

Or could it be related to the Template type?

Thanks again.

0 votesVote for this answer Mark as a Correct answer

Fabio Goto answered on June 26, 2018 16:46

Thanks, Arindam!

It wasn't using "default", but "PPTestSite", I removed the last "e", saved and it stopped popping up.

I restored the old code name and it kept that way. :O

Thanks again!

0 votesVote for this answer Mark as a Correct answer

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