Zend Framework :: title html 元素应该如何从视图中获取?(set view->headTitle())
Zend Framework :: title html 元素应该如何从视图中获取?(set view->headTitle())。
视图标题输出源示例:(我需要获取:一些浏览器标题)
<title> some browser title </title>
我的打印巨大数组的代码:
$this->view->headTitle('some browser title');//set working
echo var_export($this->headTitle()); //get not working
请帮助获取视图的标题元素。
谢谢
Zend Framework :: How should title html element get from view?(set view->headTitle()).
Example of view title output source: (I need to get: some browser title)
<title> some browser title </title>
My Code that print huge array:
$this->view->headTitle('some browser title');//set working
echo var_export($this->headTitle()); //get not working
please help to get title element of the view.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
视野中
In view
认为应该是:
$this->view->headTitle('some browser title')
;设置页面标题。
Think it should be:
$this->view->headTitle('some browser title')
;to set the page title.
将您的设置更改为:
并将获取更改为:(
请注意删除了 headTitle 后面的“()”)。
Change your set to:
and your get to:
(notice the removal of the "()" after headTitle).
迄今为止获取视图助手的返回值的最简单的解决方案:
Easiest solution by far to get the returned value of view helper: