[英]some codes in index.phtml in zend framework1
in index.phtml 在index.phtml中
...
<?php
$this->title = "My Albums";
$this->headTitle($this->title);
?>
...
Question: 题:
$this->title;
is title a property? 是财产? where can I see the declaration of $title
? 我在哪里可以看到$title
的声明?
where can i see the declaration of this method: $this->headTitle()
? 我在哪里可以看到这个方法的声明: $this->headTitle()
?
Basically $this->title
normalt view proprety which you can set form the controller.. like this 基本上是$this->title
normalt view proprety,你可以从控制器中设置..就像这样
indexControler indexControler
$this->view->title = "Test Page";
and you use this in view index.phtml like this 你在这个视图index.phtml中使用它
$this->title;
while 而
$this->headTitle($this->title);
this is a default view helper method to set the head title of html document. 这是一个默认的视图助手方法,用于设置html文档的头部标题。
like this 像这样
<head>
<title>Test Page</title>
</head>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.