Hello Friends,
In my previous post, i show you the way how to set Page Title Tag in CakePHP. But setting Meta keywords and Meta Description is not the same way as Meta Title. .Also Meta Keyword and Meta Description is important part of Search Engine Optimization. Refer to below syntax to set Meta tags in CakePHP.
<?php
echo $html->meta('keywords','enter any meta keyword here');
?>
//Output <meta name="keywords" content="enter any meta keyword here"/>
<?php
echo $html->meta('description','enter any meta description here');
?>
//Output <meta name="description" content="enter any meta description here"/>
Hi..
Very nice well managed blog Rakshit. By profession I am SEO executive, so not understood much in this post about CakePHP. But I like that being a developer, you are learning SEO techniques. It will definately help you in future lot. I am also learning some CMS and PHP now to expend my knowledge.
Gerat to read your profile however you have not mention the company you are working for. anyways if I can help you anyway I will be glad doing that.
Keep it up.
@Hetal Thanks for Compliment.
Hi,
I have big troubles customizing my meta tags. I hope you can help me out. I currently use the following line:
echo $html->meta(‘description’,$this->getVar(‘metaDescription’));
But how can I put a default value in case the $this->getVar(‘metaDescription is empty?
Cheers
April 30, 2010 at 7:23 am
Hi..
Very nice well managed blog Rakshit. By profession I am SEO executive, so not understood much in this post about CakePHP. But I like that being a developer, you are learning SEO techniques. It will definately help you in future lot. I am also learning some CMS and PHP now to expend my knowledge.
Gerat to read your profile however you have not mention the company you are working for. anyways if I can help you anyway I will be glad doing that.
Keep it up.