[eluser]msank[/eluser]
Hi guys,
I am trying to have unique meta tags for each page. So far, what I have done is only loading the DEFAULT meta tags, and I just can't see why it isn't working.
I have my header.php with this code directly after the opening head tag:
Code:
<?php
if(!isset($meta)) {
$meta = array(
array('name'=>'description', 'content'=>'A short but sweet DEFAULT description of this fine site'),
array('name' =>'keywords', 'content'=>'some awesome DEFAULT keywords for those rascally web crawlers')
);
}
?>
<?php
$this->load->helper('html');
?>
more php here.....
.....
.....
.....
<title>
...
</title>
<link rel="shortcut icon" type="image/x-icon" href="img/fav.ico">
<meta charset="UTF-8" />
<!--This is where I am calling the meta function-->
<?php echo meta($meta);?>
And then this is what I am putting in all of my pages (except for my header.php, of course!), before I include the header:
Code:
<?php
$meta = array(
array('name'=>'description', 'content'=>'Another short but sweet description'),
array('name' =>'keywords', 'content'=>'Mmmmm. Yummy keywords for you to savor')
);
$this->load->view('includes/header');
?>
html stuff goes here
Any thoughts, or ideas on this matter, please?
Thanks so much!