[Resolved] Filtering pods
I’m trying to filter my pods in a Pods Page.
I don’t know if I’m misunderstanding how filters() works or whether this is a bug, but the filtering doesn’t seem to happen. The filter controls are echoed to the page as expected, but in the browser when I choose some filters from the generated dropdowns it makes no difference to the pods that are displayed on the page. I’ve not seen any bug reports that relate to this, so I’m thinking I must be misunderstanding the docs.
Here’s what I’ve got so far (simplified) which is pretty much identical to the examples in the docs:
The documentation for filters() doesn’t state whether the method only outputs the filters form or whether it also applies the selected filters, but the example code on http://podsframework.org/docs/filters/ suggests that it should also filter:
// Get the items, search is automatically handled $pod->find();
Looking at the docs for find() the only thing I see that relates to filtering is the “WHERE” parameter. Do I need to collect all of the selected filters from the GET/POST variables and turn them into an sql-like where statement to feed to pods->find()? Or something else?
Any help greatly appreciated!
- The topic ‘[Resolved] Filtering pods’ is closed to new replies.