by ahirnitesh on Thu Oct 13, 2011 2:05 am
Meta tags are much more important in SEO, with meta tags we can allow/Disallow search engine spiders to crawl page, From Meta Title, Keyword and Description search engine come to know about page is promote for which thing, also we can provide authentication from meta tags.
following are the some methods for setting and adding meta tags:
-- > appendName($keyValue, $content, $conditionalName)
-- > offsetSetName($index, $keyValue, $content, $conditionalName)
-- > prependName($keyValue, $content, $conditionalName)
-- > setName($keyValue, $content, $modifiers)
-- > appendHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
-- > offsetSetHttpEquiv($index, $keyValue, $content, $conditionalHttpEquiv)
-- > prependHttpEquiv($keyValue, $content, $conditionalHttpEquiv)
-- > setHttpEquiv($keyValue, $content, $modifiers)
-- > setCharset($charset)
Some example to set meta tags are as below:
$this->headMeta()->appendName('keywords', 'framework, PHP, productivity');
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8')
$this->headMeta()->appendHttpEquiv('Content-Language', 'en-US');
Example to display meta in header part between <head></head> tags of html:
<?php echo $this->headMeta() ?>
Thanks and Regards
Nitesh Ahir
www.esparkinfo.com