[eluser]cahva[/eluser]
Its just matter of defining the title etc. in the controller for the specific pages. If content is coming from database, you should add title, description and keywords fields to the pages table.
If you have static pages(not coming from db) adding title, keywords and description should be simple like this:
Controller About
Code:
<?php
class About extends Controller {
function About()
{
parent::Controller();
}
function index()
{
$data['title'] = 'About title';
$data['keywords'] = 'some,keywords,here';
$data['description'] = 'Snakeoil ltd. The best oil in the business';
$this->load->vars($data);
$this->load->view('header');
$this->load->view('about');
$this->load->view('footer');
}
}
header view
Code:
<!DOCTYPE HTML>
<head>
<title><?php echo $title ?></title>
<meta name="description" content="<?php echo $description ?>">
<meta name="keywords" content="<?php echo $keywords ?>">
</head>
<body>
...
In the controller theres $this->load->vars($data) which will make $data['title'] shown as $title, $data['description'] shown as $description etc. in all views including header view.
You could also send the $data array to the header view:
Code:
$this->load->view('header',$data);
Either way will do.