How to integrate custom template in codeigniter?

Today I will explain about template functionality of codeigniter and how to integrate custom template in codeigniter.

Now let’s start with folder structure of codeigniter framework.
Codeigniter folder structure
Here in the above folders just move to applications -> libraries folder, under libraries create Template.php library file and add code as below.

After creating the template library now let’s move to Settemplate.php file, Here we will write a functions to load the template views.

Now let’s move to applications->config folder to create template.php file, here we will call the
Template index file, which we need to load at homepage or inner pages.
Let’s create the objects to display Contents, Menu’s and side bars etc.

Now let’s move to usertemp.php file in the root of codeigniter frame work .
Here we need to call the objects to display content and menu as below.

Thanks for reading this article..

Leave a Reply