0

I am using Code igniter with HMVC,

We are creating drop-in modules.

One thing I am a bit stuck on though is the routing.

I can add

$route['gallery/categories'] = 'gallery/categorieseditor';
$route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';

to the main routes.php config file and it works fine.

But I don't want to have to edit the main routes file for the modules.

I was hoping I could just drop this into a routes.php file in /modules/gallery/config/ But visiting the url just gives me a 404 (accessing /gallery/categorieseditor works).

How can I get this up and running?

Hailwood
  • 89,623
  • 107
  • 270
  • 423

1 Answers1

1

You have an error in your code:

$route['gallery/categories/(:any)] = 'gallery/categorieseditor/$1';

Should be:

$route['gallery/categories/(:any)'] = 'gallery/categorieseditor/$1';

seangates
  • 1,467
  • 11
  • 28