there is a search-form in a top-navigation (twitter bootstrap)
So if I make a request, the URL looks like
fuelphp.dev/search/?q=qwerty
wich is fine. With that URL the user should get results for his/her request provided by action_index()
but if the user goes to fuelphp.dev/search/ (without any parameters), he/she should see the "advanced Search-form" provided by action_advanced()
I alredy created a Controller_Search
classes/controller/search.php (Controller)
and View
views/search/index.twig (View)
the problem is - I don't know how to (re)write routes for that.
if I add 'search' => 'search/advanced' to the routes.php it doesnt work correctly.
Requestin fuelphp.dev/search/?q=qwerty triggers action_advanced() of Controller_Search too, whereas it should trigger action_index()
How should I rewrite my routes (or maybe Controller logic) to get this working ?
It looks like you're new here. If you want to get involved, click one of these buttons!