How do I update kentico with a new version of bootstrap?

Kentico User asked on January 12, 2016 16:09

I am using kentico 9 and out of the box it using bootstrap v3.1.0. The latest version of bootstrap is v3.6.6. When updating bootstrap do I download the source code of bootstrap and overwrite everything in the /App_Themes/Default folder?

Thank you

Correct Answer

Brenden Kehren answered on January 12, 2016 16:22

Do not update or change the version of bootstrap used by Kentico. The /App_Themes/Default theme is specific to the Kentico Admin interface. If you want to change your site to use a different version of Bootstrap then do so.

Start by getting a site setup in Kentico. Next, create a CSS Stylesheet with the same code name as your site. For instance if your site's code name is MySite, ensure the code name of your stylesheet is MySite. Next, in the stylesheet, navigate to the "Themes" tab. This will create the directory in the file system at /App_Themes/MySite. In there you can add any images, fonts, etc you'd like.

Typically what I do is add another CSS Stylesheet and call it Bootstrap and copy the CSS from the version I want to use. Then I include that stylesheet in the MySite stylesheet like so {% CSS["Bootstrap"] #%}. This will "inject" the css in the same stylesheet so place it where you want; top, middle, bottom, wherever. Lastly go back to your site and set the stylesheet to MySite for your site and it will automatically include it in your site.

There are alternative methods to this but this one is the simplest and fastest.

5 votesVote for this answer Unmark Correct answer

Recent Answers

Chetan Sharma answered on January 20, 2016 05:50

What Brenden has suggested you is the best possible solution. As a ground rules you should never change anything that's there part of the core package and is used by the core.

Brenden's solution will make sure that your css's will not interfere with each other.

Thanks Chetan

0 votesVote for this answer Mark as a Correct answer

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