Using Template in Codeigniter 3

This tutorial will show you an example on how to use template in Codeigniter. In an web application a template is recommended because there are certain regions or areas which are common to all pages and only the body portion of the page gets changed. Common areas like header, footer, left sidebar or right sidebar are mainly common areas for most of the web applications. So we will fix those common areas in the template file so that every page will use those common areas in the application and body portion of each page will contain content which is specific to the page.

We will use here Colin Williams template library to demonstrate the template system in Codeigniter. Now-a-days the Williams Codeigniter Template library is no longer being supported or improved, the last version produced was 1.4.1. So to make it work with Codeigniter I have done a little modification to it.

We will use here the same application as I have shown in but the only thing change here is I will use Template library instead of loading the view file.

If you want to use Template library with Codeigniter 2 then you can read Continue reading “Using Template in Codeigniter 3”

Setup HMVC with Codeigniter 3

This is an example on HMVC Codeigniter 3. HMVC stands for Hierarchical Model View Controller. Modular Extensions make the Codeigniter PHP framework modular. Modules are groups of independent components, typically model, controller and view, arranged in an application modules sub-directory that can be dropped into other Codeigniter applications. This allows easy distribution of independent components (MVC) in a single directory across other CodeIgniter applications.

You can also use HMVC with Codeigniter 2. Please read here


XAMPP in Windows
Netbeans 8.1
Codeigniter 3.0.6 Continue reading “Setup HMVC with Codeigniter 3”