Tuesday, April 22, 2014

Re: Routing and passed info help

query strings + https://github.com/CakeDC/search are the way to go for multiple filters that you want to persist


Am Dienstag, 22. April 2014 14:26:04 UTC+2 schrieb advantage+:

I have my index function and need to figure out to pass different variables to paginate correct.

 

Basically on the index the pagination grabs everything, but there are "filters" so take shoes for example it now gets passed that variables so the url looks like /shoes/page:2

 

But the problem now is how to add more filters? shoes/mens/black/leather/page:3

 

You can have endless categories, so I doubt routing every possible scenario is the option.

 

How would you simply pass all those variables to the controller function and let go from there

 

public function index($grab everything in 1 shot????){

                process what was passed

}

 

Thanks,

Dave

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: