DooPHP IRC channel


auto routing with subfolder from /protected/controller/admin

This is for general DooPHP discussion. Ask your questions here.

auto routing with subfolder from /protected/controller/admin

Postby v01ded » Thu Dec 29, 2011 7:45 am

Dear All,

I'm trying to get Auto Routing to a controller in subfolder without any success. The following is my setup:

Controller file in /protected/controller/admin/adminCatalogueController.php
Methods: brands()

The URL i tried to access: http://my.domain.com/admin/admin-catalogue/brands and get a ERROR 404.

Hope that some kind soul can enlighten me! Thanks in advance
Regards
Stanley Lim
v01ded
 
Posts: 2
Joined: Tue Dec 06, 2011 6:46 am

Re: auto routing with subfolder from /protected/controller/admin

Postby v01ded » Mon Jan 02, 2012 2:20 am

Anyone have any idea please?
v01ded
 
Posts: 2
Joined: Tue Dec 06, 2011 6:46 am

Re: auto routing with subfolder from /protected/controller/admin

Postby donkapone » Mon Jan 02, 2012 8:39 am

Are you sure you have set $config['AUTOROUTE'] to TRUE in common.conf.php ?
donkapone
 
Posts: 27
Joined: Fri Jun 17, 2011 4:46 pm

Re: auto routing with subfolder from /protected/controller/admin

Postby RichardM » Tue Jan 03, 2012 3:41 pm

Hi,

Subfolder would require you to write it as a module and not put it into the main controller folder.

Alternatively you could look at adding a wildcard pattern into the routes.conf.php file to map from '/admin/:controller/:method' but this isn't quite supported 100% with the main code base.


Richard
Note: code samples my not be 100% accurate.
RichardM
 
Posts: 1329
Joined: Sun Aug 30, 2009 6:03 pm
Location: Cumbria, UK


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests