Having a look at you problem the solution all depends on how you would
like the url's to be later.

With the first solution I would personally use the following order
$country, $state, $city, $club

This way you can build your urls as follows
/index/1         // To display country 1
/index/1/2      // To display all information in the state 2 that
belongs in country 1
/index/1/2/3   //  To display city 3 in state 2 in country 1
...

This way if a users goes and tries and edits the url you will still
get valid information.
This is a good solution if the content that you are displaying does
not differ between each type, if the displays differ completely then I
would look at creating individual function then this way you will be
able to keep the different displays separate.

Regards
Wilhelm

On Sep 11, 12:36 am, DerBjörn <[email protected]> wrote:
> Hi,
>
> assuming i have a model "player" and i want to show all players of
> different "scopes".
> For example all players of one state, one club or one country. What is
> the best solution for this problem?
> One index a la index($club_id = null, $country_id = null, $state_id =
> null, $city_id) or it is a better way to seperate this scopes
> logically.
> For example: index_by_location($country_id = null, $state_id = null,
> $city_id) and index_by_club ($club_id = null) etc.
> One index with a lot of parameters or different ones for different
> scopes? Or a completely different solution that would be...
>
> Thanks :)

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to