Easy structure builder
- Codeigniter-Boilerplate helps you start a new project in a few minutes
thanks to a simple template, based on HTML5 Boilerplate, resulting in the
best cross-browser experience and fast/easy CSS styling.
- Codeigniter-Boilerplate has a prebuild structure which encapsulates single page views into a container view which shares parts of code like header, footer and script.
- Codeigniter-Boilerplate has the primary aim to help developers build simple pages as fast as possible, but without rigid structures. This means allowing the definition of custom elements for any page without restrictions. Developers here have fast access to title, description, javascripts, css, Google Fonts and (obviously) content for any single page.
Let's code!
class Example extends BP_Controller { public function index() { //Meta tag information $this->title = "Example!"; $this->description = "A Codeigniter-Boilerplate example"; //Defining CSS styles $this->css = array("BP/homepage.css","BP/example.css"); //Loading GoogleFonts fonts $this->GFont = array("Lobster","Puritan"); //Passing custom data to the View $toView["color"] = "Green"; //Render the page $this->build_content($toView); $this->render_page(); } }
CI Configurations
Codeigniter configuration for Boilerplate starts with:
- Autoload: url helper
- Routes: default_controller = "homepage"
- Index.php: subclass_prefix = "BP_"
- Base url: http://localhost/codeigniter-boilerplate
Version Information
V2.1
V3.0 Stripped