[eluser]tomdelonge[/eluser]
I'm making something similar to a shopping app. In the past, if I've needed to use the urls to generate queries, it was usually pretty simple, like:
example.com/product/view/by_brand/BRANDIDHERE
However, this store requires a lot more complication than that. I want to have an action in my controller that basically will show the items according to the parameters. But how would you do complicated ones, like
-All items with Brand X OR Brand Y
-And all items with color A and color B
You know what I mean? I don't have any problem at all figuring out what queries to do, that's easy.
However, I want to design the urls in the best way possible. How should I take them apart? I understand the uri class just fine, But I run into problems like this:
If I go to an associative array, and need to be able to do two brands, how could you do that? (And I want an unspecific amount of brands possible, not just to have a "brand_1" and "brand_2" paramter.
Also, how could I use "And" (like my earlier color example)
Suggestions? Just give me some ideas please.