Welcome Guest, Not a member yet? Register   Sign In
Title, Description, and Keyword best practice
#1

[eluser]xerosis[/eluser]
I am creating a site which has many pages, each page has its own:
- title
- description
- keyword

Now I have been reading that is is not good practice to call a model from a view.

I have a file called header.php where title, description, and keywords are saved.

What I am currently doing is on each function of each controller I am creating below:
Code:
$seo = array('title' => 'Title of Site', 'keywords' => 'Keywords', 'description' => 'Something about the site');

and when I call the view I call the $seo like:
Code:
$this->load->view('main/main_index', $seo);

Is this the right way to do this? I have a page where I have products and title needs to be dynamic and I don't know what to do there.

Basically if someone can explain to me what is the proper method of doing this, would appreciate it.


Messages In This Thread
Title, Description, and Keyword best practice - by El Forum - 03-01-2011, 12:56 PM
Title, Description, and Keyword best practice - by El Forum - 03-01-2011, 09:46 PM
Title, Description, and Keyword best practice - by El Forum - 03-01-2011, 11:12 PM
Title, Description, and Keyword best practice - by El Forum - 03-02-2011, 03:47 PM
Title, Description, and Keyword best practice - by El Forum - 03-02-2011, 05:06 PM
Title, Description, and Keyword best practice - by El Forum - 03-02-2011, 05:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB