zend_view 中的 headMeta() 什么也不返回,我做错了什么?
我将 Pimcore 与 Zend Framework 结合使用。在我的标题视图中,我输出:
headMeta(); ?>
输出为空。 相反,我将其更改为:
>
效果很好。这里的问题是我想正确使用 zend 并且我觉得这可能不是最理想的方法。
谁能指导我执行此操作的正确方法?
谢谢你!
I'm using Pimcore with the Zend Framework. In my header view, I output this:
<?php echo $this->headMeta(); ?>
The output is blank.
Instead I've changed it to this:
<meta name="description" content="<?php echo $this->document->description ?>" />
<meta name="keywords" content="<?php echo $this->document->keywords ?>" />
That works fine. The issue here is that I want to use zend correctly and I feel that this is probably not the most ideal approach.
Can anyone coach me on the correct way of performing this?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您的
Boostrap.php
文件中,您需要使用如下值初始化head
:此代码属于
_initViewHelpers
函数。然后你可以在中调用它:
In your
Boostrap.php
file you need to init thehead
with values like this:This code belongs in the
_initViewHelpers
function. Then you can call it in the<head>
: