开发者

Why does Magento overwrite my keywords

I have a weird problem. Within a template (phtml) I s开发者_开发知识库et Keywords via

$this->getLayout()->getBlock('head)->setKeywords('bla, bla, bla');

In an other .phtml from another block, which is rendered afterwards, I still have the keywords (checked in debugging with ... ->getKeywords()).

But, when the page is fully rendered, the keywords are set to the default ones. I just debugged through the whole process until renderLayout() is finished, but I can't find the line, where the keywords are set to default..

Does someone know any workaround ?


Looks like you are missing a closing quote around 'head'. Should be:

$this->getLayout()->getBlock('head')->setKeywords('bla, bla, bla');
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜