Hi, i'm new to Yii and is currently trying out this framework for a freelance project i am working on so far.
I've looked around the forums and documentations and found not much information about building search functionalities into your applications.
In your opinions, what would be the cleanest way to build in a search function for the list view of a particular model? i.e. my project is currently a used-car catalog site, so i would want to be able to search my list of cars with a multi field form with these fields:
Search Term
Make
Model
Engine Capacity
Etc.
My first thought would be to build a new Search Action into the Car controller and have it render the list. But i'm not sure the search will be persistent that way (i.e. after clicking on pagination links, will the listings still be relevant to the search or will it reset to the full list?)
What i mean is to add the search action into the Controller of the model i wish to search (i.e. car). and also add public attributes to this controller for the search fields as well.
The reason i want to do this is so i can have a search in both admin and list views.
My bad. I kept thinking for some reason that you meant to create a SearchFormController for the SearchForm model which i felt was unnecessary and counter-productive
This seems like a clean solution, i'll try to see what i can write up with this.
Once again thanks alot. This is a great framework.