Welcome Guest, Not a member yet? Register   Sign In
Routing a controller - how to dismiss certain functions?
#1

[eluser]loathsome[/eluser]
Hello,

I'm currently developing an application, and for this I have a signup-controller. As a first parameter in the index function I have a variable whose purpose is to receive a language code and process it later on. (En, Gb, etc)

Code:
class Signup extends Peeps_Controller {

function index($Lang = false){
/* :D */
}

}

Now, I want to route everything that goes to app/signup to app/signup/index/$1 - EXCEPT "post" and "quick", those should go to app/signup/post - because those are their own functions. I do not want to create another route, but rather do it all in the same using regex - I'm almost there. I've tried
Code:
$route['signup/((.*)|^post|^quick)'] = "signup/index/$1";
but without any luck. To sum it up:

app/signup/whatever should go to app/signup/index/whatever
app/signup/post OR quick should go to app/signup/post OR quick


Messages In This Thread
Routing a controller - how to dismiss certain functions? - by El Forum - 04-30-2009, 06:32 AM



Theme © iAndrew 2016 - Forum software by © MyBB