Friday, June 18, 2010

How to Add Robots Meta Tag to a CakePHP View File

This is a pirated idea... and hats off to Maquel Collado for his wonder post

Adding robots meta-tag to a CakePHP view

You should check the original there. And here is a carbon copy:

<?php $html->meta('robots', null, array('name' => 'robots', 'content' => 'noindex') ,false); ?>

Add this html helper in its exact form in your view file. 


<meta name="robots" content="noindex"/> 

And it will appear within the <head> </head>   

And all the well behaved robots (Sure! Google is so) will stop indexing those pages.

Thanks Miquel. You are a genius!

No comments: