how could I add some variables to my layout.phtml? I could add it in every Controller like here: Sending variables to the layout in Zend Framework
但這並不是很有啟發性,而且在Bootstrap中我不想添加它。
how could I add some variables to my layout.phtml? I could add it in every Controller like here: Sending variables to the layout in Zend Framework
但這並不是很有啟發性,而且在Bootstrap中我不想添加它。
創建將擴展 Zend_Controller_Action
的新抽象控制器。
IndexController extends My_Controller_Action
->
My_Controller_Action extends
Zend_Controller_Action
在那裏你應該放入一個 init()
,無論你想要什麽。 :)