Bootstrap.js interference

Adam Conde asked on August 14, 2014 02:54

I'm trying to leverage Bootstrap 3 to build our website, however I think the bootstrap.js that I've included in the master page layout, interferes with the bootstrap that the kentico cmsdesk is using. This prevents the editor from functioning properly. How can I tell Kentico to only load my bootstrap.js from the master page layout if I'm not in editor mode?

Hopefully I explained that well, let me know if you need any more clarification.

Correct Answer

Brenden Kehren answered on August 14, 2014 03:08

How are you loading the js file? Are you using the JavaScript webpart? If not, I'd highly suggest it as it will handle that for you.

3 votesVote for this answer Unmark Correct answer

Recent Answers


Yehuda Lando answered on August 14, 2014 09:13

You can use this macro PortalContext.ViewMode != "Design" or PortalContext.ViewMode == "LiveSite" in the visible property of the JavaScript web part.

1 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on August 14, 2014 13:28

@Yehuda, in code behind, the JavaScript web part already does this so no need to handle it again.

0 votesVote for this answer Mark as a Correct answer

Adam Conde answered on August 20, 2014 20:37

Thanks Brenden, that works perfectly.

0 votesVote for this answer Mark as a Correct answer

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