Search code examples
phpcodeignitertemplatespage-layout

Setting up a full site page in CodeIgniter


I am just starting with CodeIgniter, but I can’t quite figure how to sort out my views.

I’ve made a sample layout explaining my problem, and is attached to this post.

I have a menu box, a user-system box and a content box.

In procedural PHP I would have a page called index.php with a parameter from GET, including the content. The user-system would just be included in the index.php file inside the box, and so would the menu.

How can I do this in a proper way using MVC and CodeIgniter?

enter image description here


Solution

  • Try Most Simple Template Library for CodeIgniter. It allows you to do what you would do in your php example. Create a "main" view and channel your content to it using your controller(s). You can create "subthemes" for body, content, sidebars etc.