Friday 24 May 2013

Using CodeIgniter with BootStrap

PURPOSE OF THIS TUTORIAL

Showing you how to use twitter bootstrap with codeigniter

ENVIRONMENT

  • NetBeans IDE 7.2.1 
  • xampp 1.8.1
  • JQuery 
  • Twitter BootStrap


STEPS
  • download CodeIgniter and unzip
  • download the minified and source Bootstrap and unzip 
  • download JQuery and unzip
    • if you are using xampp 
      •  move "applications","system" and "index.php" from CodeIgniter folder to c:\xampp\htdocs\<project-name>\
      • merge the "js","img","css","less" file from the the minified and source bootstrap unzipped folder and move them to c:\xampp\htdocs\<project-name>\
      • rename the JQuery javascript file in the unzipped JQuery folder to jquery.js and move it to the "js" directory under c:\xampp\htdocs\<project-name>\
  • start creating an existing project of CodeIgniter for c:\xampp\htdocs\<projectname>
  • replace the welcome_message.php of codeigniter by one of the templates in bootstrap examples  and replace all the "../assets/" by "<?php echo base_url(); ?>" but for the base_url function to work you have to add "$autoload['helper'] = array('url');" under applications/autoload.php in your codeigniter project folder
  • test 

No comments:

Post a Comment