zend_view中的headMeta()不返回任何内容,我在做什么错?

| 我在Zend框架中使用了Pimcore。在标题视图中,输出:
<?php echo $this->headMeta(); ?>
输出为空白。 相反,我将其更改为:
<meta name=\"description\" content=\"<?php echo $this->document->description ?>\" />
    <meta name=\"keywords\" content=\"<?php echo $this->document->keywords ?>\" />
很好这里的问题是我想正确使用zend,我觉得这可能不是最理想的方法。 谁能指导我正确的执行方式? 谢谢!     
已邀请:
在您的
Boostrap.php
文件中,您需要使用以下值初始化
head
$view->headMeta()->appendHttpEquiv(\'Content-type\', \'text/html; charset=UTF-8\')
                 ->appendName(\'description\', \'mySite\');

$view->headTitle()->setSeparator (\'-\')->headTitle(\'myPage\');

$view->doctype(\'HTML4_STRICT\');
该代码属于“ 5”功能。然后可以在
<head>
中调用它:
<?php
    echo $this->doctype ();
?>
<html>
    <head>
    <?php 
        echo $this->headMeta();
        echo $this->headTitle();
    ?>
//...
    

要回复问题请先登录注册