gpt4 book ai didi

magento - 如何在 Magento 模块中使用 php 设置元标记?

转载 作者:行者123 更新时间:2023-12-04 18:12:11 26 4
gpt4 key购买 nike

这在我的 .phtml 中不起作用文件。

$head = $this->getLayout()->getBlock('head');
$head->setTitle("title blah");
$head->setDescription("description goes here");
$head->setKeywords("apples bananas coconuts");

最佳答案

我相信您会希望将该代码放入您的 Controller ,而不是您的 View 文件中。

关于magento - 如何在 Magento 模块中使用 php 设置元标记?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11520702/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com