Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

3.0 - Add Module Feature #2619

Closed
muhammadcahya opened this Issue · 2 comments

3 participants

@muhammadcahya

During this time I possessed basic standard modules , frontend ( for the primary domain ) , and the backend ( for example like the admin ) .

for the frontend I usually make with standard way , and for the backend/admin , I use Prefix Routing .

But I guess there is a little difficult with this way , In my controller, any action with an admin_ prefix will be called. Using our users example, accessing the URL /admin/users/edit/5 would call the method admin_edit of our UsersController passing 5 as the first parameter. The view file used would be app/View/Users/admin_edit.ctp

The problem is when a client asked me to change it , for example, they want to replace admin with the webadmin , I have to replace function in the controller , also in the name of each file CTP view .

Also difficult when I want to make it into a subdomain on shared hosting like cpanel .

Is this version supports the feature module , with subfolders for example ?
For the default module , such as public or frontend which can be accessed by default on the root domain : http://localhost/cakephp3/

So if you want to make another module like backand or admin as the new module , can be accessed at http://localhost/cakephp3/admin/

@lorenzo
Owner

CakePHP 2.x supports plugins, you could have an Admin plugin if you want all that logic separated from the frontend. Additionally you can call $this->render('old_template_name') if you don't wish to change the file names once a function name changes.

In CakePHP 3.0 we already have implemented Prefix routing using separated controllers in a different folder as described in this wiki page:

https://github.com/markstory/cakephp/wiki/Prefixed-actions

You will also be able to keep the ability of using plugins to completely separate admin logic.

@markstory
Owner

If plugins and the new prefix routing aren't enough let us know, and we can re-open the issue and find a better solution.

@markstory markstory closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.