Zend - 奇怪的标题行为

时间:2011-10-14 11:22:36

标签: php zend-framework

用headTitle()函数看到一些非常奇怪的行为。 我的索引页面看起来很好,它显示了我的application.ini文件中定义的项目标题。

但是,我的站点控制器在我的控制器上设置时会显示一些奇怪的标题。

// [application.ini]
project.title = "Portal"

// [indexController.php]
$this->headTitle([project][title]); //  -> this results in title "Portal" which is correct

// [ControllerOne.php]
$this->headTitle('Today News', 'PREPEND'); //  -> this results in a title similar to "Today News - SomeOtherController - Today News - Portal" which is totally wrong and odd.

我为什么看到这种行为的想法? 我在我的所有项目中为headTitle运行了一个grep,一切看起来都对我不对。我还尝试将几个headTitle()函数注释掉,只是为了调试并且仍然是相同的行为。

这是函数中的某种错误吗?有没有人有任何调试技巧来解决这个问题?这是我与zend的第一个项目,并不知道还有什么要看。

非常感谢你!

0 个答案:

没有答案
相关问题