#1
Is it possible to get custom routing from the modules rather than having it all bunched up in custom_routing.php.

Example: modules\welcome\welcome_routing.php

So we can do something like this in the custom_routing.php



Could make that a little bit better but you get the idea, I done a simple include to test and obviously the include gets included but not the defined $routes.

Probably missing something silly but maybe it's the way routes are handled ?
#2
Hello,
I would think that you would have to find a way to add to the $routes variable in the config/custom_routes file. $routes is then set in the CUSTOM_ROUTES variable passed to the get_segments file.
This CUSTOM_ROUTES is loaded at runtime. Not sure if what you want is possible.
#3
One day this may just happen.
'thankyou' => 'paypal/thankyou'
'common-questions' => 'webpages/common_questions'
custom_routing is happy.
#4
The answer is 'no'.

At least, I think it's no.

The framework starts by going through 'core', 'boostrap', then 'Trongate.php'. The main purpose of all of that is to figure out which module to load - based on the URL and type of HTTP request.

By the time the module has been invoked, you've made it past the point of figuring out what to load.

I think there IS a hypothetical of having the Trongate class reference the 'current module' but it's all ridiculously confusing. I just can't do it. Even if I could figure it out, we'd be lost in web of IF statements. It's a mug's game.

I apologise if it's not the answer you were hoping for.

Macho love.
#5
spot on DC, the answer is no.
#6
Sorry for the late reply. Yeah, a simple yes or no whith a why is great thank you, thought maybe I was just missing a trick or two.

At the same time it's doable though, when I next have some free time I wouldn't mind having a little bash at this.

[ Can consider this closed or resolved now. ]
#7
To close this could you please select the best answer and click the star in that thread.
Thanks,
Dan