如何在Magento模块中使用php设置元标记?
这在我的如何在Magento模块中使用php设置元标记?,magento,Magento,这在我的.phtml文件中不起作用 $head = $this->getLayout()->getBlock('head'); $head->setTitle("title blah"); $head->setDescription("description goes here"); $head->setKeywords("apples bananas coconuts"); 我相信您会希望将代码放入控制器,而不是视图文件
.phtml
文件中不起作用
$head = $this->getLayout()->getBlock('head');
$head->setTitle("title blah");
$head->setDescription("description goes here");
$head->setKeywords("apples bananas coconuts");
我相信您会希望将代码放入控制器,而不是视图文件