SEO meta tags under Cakephp 1.2
Setting your pages meta tag keywords and description is simple under CakePHP 1.2, all one needs is the Html Helper's meta() function. Probably the easiest way is to see how its done is with an example, this code is added to your view files :-
Show Plain TextIn my original article on meta tags I ended up setting a variable in the view and checking for the variables in the default layout file. I had tried the $html->meta() function originally but couldn't get it to work and didn't have time to figure things out.
It wasn't till I was trying to get some javascript code to output into the head section from a view using the $this->addScript() function that I realized I didn't have the echo $scripts_for_layout line in the default.ctp layout.
Not sure when or how I deleted it but in the words of Homer Simpson all I can say is DOH.
Update: 2 Dec 2008, I see an example of meta() function is now documented in the CakePHP book, please refer to this page Inserting-Well-Formatted-elements
Thanks fellow developer, I'm on a time crunch and this was a little piece of treasure in the form of a blog post that came up on google. You rock!