Welcome Guest, Not a member yet? Register   Sign In
default_controller & default index() method: Clarifications/tips please...
#2

[eluser]Jameson.[/eluser]
Let's not go into detail, but instead try to get a bigger picture.

You're writing you want to pass arguments to the default controller...

Stop.

Think.

What IS A "default controller"?

It's the controller fired up when a visitor comes to your site. The very first page. You don't know anything yet about this person, not his geolocation, not his preferences, nothing. Neither he did express the need to filter any data, view any other page, search for any stuff...

So WHY do you need to pass some data to your controller at this point? What data could you pass?
From where would all these IDs (and also a method) appear?
http://mydomain.com/folder/default_contr...d/id/id/id

They would not apepar, because there was no link with custom method and parameters to follow. A person just typed in a bare domain name, just domain.tld, with no controller/method indicated, no arguments. THIS is where you need default controller, only in case not one is explicitly set. In all other cases you can, you should specify controller and method.

Hope that helps Wink


Messages In This Thread
default_controller & default index() method: Clarifications/tips please... - by El Forum - 12-25-2009, 12:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB