Using jQuery and the Twitter Bootstrap Library

Hi all,

I have been reading through all the forum entry's on loading jQuery in a Concrete5 Theme.

My question is simply how do you load the Twitter Bootstrap jQuery library in to a theme without using blocks and or spending hours writing functions and the like.

My client will not require the elements as selectable custom blocks nor will they need to edit them once implemented as they only wish to add blog entry's, text and some images.

I understand that jQuery comes built in to Concrete5 but I'm not sure how to implement this with the bootstrap library.

I am using concrete5 as it is very user friendly for my clients but i wish it was as easy as it is in Wordpress to add the basics.

View Replies:
mesuva replied on at Permalink Reply
Hi Shane,

I'm having a little trouble myself understanding what you are really asking for here, as I think you may have mixed some of your terminology and concepts up. Twitter Bootstrap is a CSS library, while jQuery is a Javascript library.
Twitter Bootstrap does have some jQuery plugins for things like popups and menus - perhaps that's what you are asking about.

Here's some points that might help:

- jQuery is always loaded into a theme, so you don't need to do anything to be able to use it, just include in your theme some javascript that makes jQuery calls.

- If you are wanting to load Twitter Bootstrap (the CSS library), that's more complicated, as concrete5 uses a special version for the interface, not for creating themes. If you are wanting to use Twitter Bootstrap, you might find it easiest to buy one of the pre-built themes that have been made that use it, as they've taken care of making sure the library loads properly and doesn't clash. I love personally love Twitter Bootstrap, but only for web-app interfaces, not for websites designs as such.

- If you are wanting to include additional javascript libraries, put them into a js folder of your theme and edit the elements/header.php file to link them in:
<script src="<?php echo $this->getThemePath() . '/js/custom.js';?>"></script>

(I'm assuming here you have already created a custom theme)

- You only need to think about loading in scripts for custom blocks if you are creating a custom block with javascript fancy-ness. From what you've said, you're just talking about the theme level here.

- You'll probably find concrete5 much easier than wordpress to make coding changes, no need to write any functions...
ShaneSheppard replied on at Permalink Reply
Hi Mesuva,

Thanks for getting back to me so quickly.

Yes I was talking about Bootstraps jQuery plugins that come along with the framework,
I already have the CSS working (I think) from bootstrap (apart from fixed top navigation)

I love working with Twitter Boostrap I find customising its CSS to my own designs while keeping its functionality speeds up the mock up and development process and let's me concentrate on the CMS functionality for a client.

I will test your information tomorrow and let you know how it went.
bigproof replied on at Permalink Reply
Hi Shane,

I think you need to check this theme :
ShaneSheppard replied on at Permalink Reply
I have purchased the bootstrap theme to try and save myself some time in the long run.
I have installed this as a package so how do i access the theme that come with it through the theme selection menu?