Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Tips and Tutorials
Module : Edit the route
i have create an module "lbContact", but i don't like the segment "lbContact" in my URL.
I have create this lines in my app/config/routes.php :
'contact(/:any)?' => 'lbContact$1'
It's work, but now my routes.php in modules/lbContact/config/ is now useless ...
For keep working my routes.php (module side), i have create a controller "router.php" :
class Controller_Router extends \Controller_Hybrid
public function action_index($route)
return \Request::forge('lbContact/' . $route)->execute();
And my line in routes.php (app side) is now :
'contact(/:any)?' => 'lbContact/router/index$1',
Now, it's work ! My module use custom segment "contact", and use custom routes from routes.php (module side).
My method is good ? Or better solution exists ?
Can't think of it.
Module routing is a long outstanding issue that we don't have a good solution for, but is on the table to address in 2.0.
Add a Comment
It looks like you're new here. If you want to get involved, click one of these buttons!
Apply for Membership
↳ Job Board
↳ Installation & Setup
↳ Tips and Tutorials
↳ Code share
In this Discussion