I want to be able to add a meta tag from a view (or controller if possible) in CakePHP
I have a page like /mycontroller/myview but when it is accessed with filters like:
/mycontroller/myview/page:2/max_price:500
Then I want to add meta no follow tags.
There is a meta method on the HtmlHelper class.
When I call it like this:
$this->Html->meta('keywords', 'test test test', array('inline'=>false));
It creates a meta tag like this:
<meta name="keywords" content="test test test" />
However, when I call it like this:
$this->Html->meta('robots', 'noindex, nofollow', array('inline'=>false));
I would naturally expect and want it to create this:
<meta name="robots" content="noindex, nofollow" />
Instead I get this though:
<link href="http://www.example.com/mycontroller/noindex, nofollow" type="application/rss+xml" rel="alternate" title="robots" />
What am I doing wrong?
From the documentation page (last line)
In your case:
Hope this helps