Welcome Guest, Not a member yet? Register   Sign In
Proper way for controlling meta tags.
#1

[eluser]mTuran[/eluser]
In my web site have some meta tags like description or keywords sure. I want to change them from controllers dynamically one way to do that is:

Code:
<title><?=$page_title;?></title>
    <meta name="language" content="en" />  
    <meta name="description" content="<?=$page_description;?>" />

Code:
$data['page_title'] = 'Bla bla bla';
                $data['page_description'] = 'Bla bla bla';
        $this->load->vars($data);
        $this->load->view('layout/default');

This way works but i don't think it is proper way because if i want to write nothing to page_description and not write $data['page_description'], there will be occur notice errors. I have a idea. I think if i code meta library and add to auto load, i can easly control meta tags like $this->meta->set_desc('bla bla bla');

Is this proper way ? Thank you


Messages In This Thread
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 03:28 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 03:46 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 03:58 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 04:04 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 04:55 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 05:03 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 05:31 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 05:49 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 06:16 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 06:26 AM
Proper way for controlling meta tags. - by El Forum - 06-23-2009, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB