CodeIgniter Forums

Full Version: Template system in CI 2.0.3 question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum


I'v just started with Codeigniter and I have some problems figuring out how to develop a good template system.
Usually I would create a switch in my index file and include the page the user is requesting.

<div id="content">
        switch($page) {
            case 'addpage':
            case 'addnews':
            case 'addblog':

Perhaps this isn't a "pro" way of doing it but it works Big Grin

My question, is there a way of doing this with functions within CI or do I need to find a template library compatible with CI v2.0.3? I have found some libraries but they don't seem to work with 2.0.3.