0

I am developing my first Zend website, and I just finished the Back-office. The problem is that I did not create any module, but now that I have to develop the Front-office I would like to create a different module.

Knowing that I already have about 20 controllers for my back-office, how could I easily change their module to "Administration" ?

Then I would place the front office in a "Public" module and the main engines will be left in the "Default" module.

Thanks for your help !

4

1 回答 1

0

我假设你使用Zend_Application.

在 application.ini 中启用模块:

resources.modules =
resources.frontController.moduleDirectory             = APPLICATION_PATH "/modules"
resources.frontController.controllerDirectory.default = APPLICATION_PATH "/controllers"

为您的新“公共”模块创建一个新的文件层次结构:

library
public
application
    - controllers // class UserController extends Zend_Controller_Action
    - views
    - modules
        - frontend
            - controllers // class Frontend_UserController extends Zend_Controller_Action
            - views

后台:

http://server.tld/user/add

前端/公共:

http://server.tld/frontend/user/list
于 2011-05-27T11:14:53.137 回答