使用默认结构:使用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