使用默認結構:使用Zend在視圖中創建額外的文件夾?
application
- controllers
- - IndexController.php
- models
- views
- - scripts
- - - index
- - - - index.phtml
- - - - create.phtml
我IndexController.php在我的控制器文件夾看起來像:
class IndexController extends Zend_Controller_Action { ... }
如果我想裏面添加文件夾是這樣的:
application
- controllers
- - IndexController.php
- models
- views
- - scripts
- - - index
- - - - posts
- - - - - index.phtml
- - - - - create.phtml
- - - - index.phtml
- - - - create.phtml
在我的帖子indexAction和createAction中創建控制器的路徑和文件名是什麼?另外,你擴展了哪個控制器,你怎麼命名它?
是'posts`的一個動作?或者是你的行爲`postsIndexAction`和`postsCreateAction`? – 2010-12-07 21:01:03
這是適用於「部分視圖」的情況下 – tawfekov 2010-12-07 21:11:17