Hi,
I'm using Zend Framework 1.8. I have a problem with headMeta() duplicating my meta keywords.
In my layout.phtml, I have
<?php echo $this->headMeta(); ?>
I have a Custom Controller_Plugin_ViewSetup
(extending Zend_Controller_Plugin_Abstract
) that has the following code in it, in the dispatchLoopStartup()
function:
$view->headMeta()->setHttpEquiv('Content-Type', 'text/html;charset=utf-8');
$view->headMeta()->setName('keywords', 'global,generic,keywords,');
Finally, in my view scripts, I have the following:
$this->headMeta()->appendName('keywords', 'view,specific,keywords');
I was expecting that in my HTML source code, I would see:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="global,generic,keywords,view,specific,keywords" />
However, I actually see this:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="keywords" content="global,generic,keywords," />
<meta name="keywords" content="view,specific,keywords" />
In other words, the meta keywords aren't concatenating together as they should. What am I doing wrong?
Cheers,
Matt