Welcome Guest, Not a member yet? Register   Sign In
is there a way to make Codeigniter use a template for the pages ?
#9

[eluser]Armchair Samurai[/eluser]
You can easily do this with CI. Set up a template page (template.php) in the views folder:

Code:
<html>
<head>
<title>Foo</title>
</head>
<body>
<?php $this->load->view($content);?>
</body>
</html>

Then when you call a view from your controller:

Code:
$this->load->vars(array(
    'content'    => 'page_to_load'
));
$this->load->view('template');


Messages In This Thread
is there a way to make Codeigniter use a template for the pages ? - by El Forum - 03-01-2011, 10:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB