[eluser]Unknown[/eluser]
Hello
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.
Example
Code:
<div id="content">
<?php
switch($page) {
case 'addpage':
require('pages/addPage.php');
break;
case 'addnews':
require('pages/addNews.php');
break;
case 'addblog':
require('pages/addblog.php');
break;
default:
require('pages/start.php');
break;
}
?>
</div>
Perhaps this isn't a "pro" way of doing it but it works
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.