[eluser]Brayan[/eluser]
Hey Bill the Grue.
You can do it like I do:
create a view called template.php, and put this into:
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title; ?></title>
<link rel="stylesheet" href="<?php echo base_url();?>assets/css/style.css" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
<div id="header">
<h1><?php echo $title; ?></h1> <!-- or create a view and load here -->
</div>
<div id="main_content">
<?php $this->load->view('menu'); ?>
<?php $this->load->view($page); ?>
</div>
<div id="footer">
Copyright 2010. <!-- or create a view and load here -->
</div>
</div>
</body>
</html>
and in a controller, here is a method example:
Code:
class myclass extends Controller{
private $data;
function index() {
$this->data['title'] = 'Welcome back !';
$this->data['page'] = 'welcome_message';
$this->load->view('template', $this->dados);
}
}