Hi Belén, I have some questions about 7461 "Filters not working as designed", in particular your issue #2.
Issue #1) "The 'all' count for a filter when there is an existing filter" This is easily fixed with "total_count", and I have done so for my pages in #6040. I do observe that this value "total_count" was intended only for "filtersnippet.html", but "layers.html" is also using it instead of the standard "objects.paginator.count", so that should be fixed. Issue #2) "The counts for filters when existing search" Here is a problem. The core issues is that there are exactly two queryset objects to select from: * "queryset_all", which is all objects * "queryset_with_search", which is the object set after _both_ the search and/or filter In other words, there is no object list for just the search list and no filter, and without that your point #2 cannot be done. Here are my recommendations: (a) Always use the queryset_all set, and refine this in YP-1.9. This is easy, though not perfect. (b) Have "_get_queryset" return an additional set "queryset_just_search". This provides the middle dataset to meet your requirements, at the cost of another potentially large data object sitting in memory. Issue #3) "... , but the resulting string [for the heading of the filter ] is a bit to complicated" Hmm, they look succinct to me. Can you give an example? - David
-- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
