Closed (won't fix)
Project:
Better Exposed Filters
Version:
7.x-3.0-beta1
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
18 Feb 2012 at 00:04 UTC
Updated:
25 Sep 2021 at 09:51 UTC
Jump to comment: Most recent
Comments
Comment #1
ferahl commentedWould also like this feature or find out how to do it
Comment #2
tahiticlic commented+1 for this functionnality.
In my own use case :
I'll crosspost on Views issues list, since this is more Views related (I tought it was a views issue here...)
Comment #3
tahiticlic commentedIn fact, you can separate those blocks quite easily :
Comment #4
deggertsen commented@tahiticlic Seems like a brilliant solution (thought not so elegant). Is there any chance this would cause any performance issues?
Comment #5
deggertsen commentedSo I figured out a problem with the "solution" in #3. When one exposed filter is used from one view display and then the other is used from the second display, all of the filters selected from the first display are forgotten in favor of the latter.
Now is appears that this problem is only happening when the sort order or the items per page are changed by one of the exposed filter. As long as you only stick to changing filter criteria it seems like this is working alright. I have tested with and without AJAX enabled and with limited testing it appears that there are more issues with AJAX, but I'm not sure.
Anyways, it would be nice to see this in Views, but it is likely a views issue rather than a Better Exposed Filters issue. I'm looking for potential duplicate issues and I may come back and reassign this issue depending on what I find.
Comment #6
deggertsen commentedPotential duplicate issues:
#1337580: How to split the exposed filters to separate blocks?
#1420332: How to separate exposed filters and sort? - I like the panels solution used here assuming it works. My initial test has not been successful.
Comment #7
Exploratus commentedI find the sort exposed filters in views to be very unintuitive. It would be great to be able to split them and have a more traditional exposed search filter, and then a sort filter as a separate block.
Comment #8
berliner commentedSee #1337580-9: How to split the exposed filters to separate blocks? for a sandbox module that tries to solve this problem.
Comment #9
mikeker commentedIssue queue cleanup... My apologies for taking so long to address this issue!
Sorry, but this is beyond the scope of BEF. It would be better if Views were to provide separate blocks for each of these items -- then all Views-related modules could benefit from it. And it sounds like there is a possible solution in #8 (thanks for adding that, @berliner!), so I'm closing this as won't fix.
Comment #10
sander wemagine commentedThe solution I used is MultiBlock.
And your done!
Comment #11
jphelan commentedThe mefibs (More exposed forms in blocks) module does this very well.
https://www.drupal.org/project/mefibs
Comment #12
alejo dHello,
Any solution for this on D9 ? because that approach only works on D7.
Thanks.
Comment #13
aharown07 commentedThe method in #3 works in D9.
Some further explanation may be helpful. For some of us, this is counterintuitive.
Here's what I just did with one site.
I wanted a search input field on without any sorting, but wanted the sort options included on the search result page only. I already had the search result View created, and two block instances: one for and one for the result page. (Did that because I wanted them in different regions).
But they both included the exposed filter sort options.
(Side note: since I already had a separate instance of the block on in a different region, I'm pretty sure I could have used display: none in the CSS with the right selector to make sort invisible. But since this particular page is likely to see a good bit of traffic, it seems better to not render the sort stuff at all)
Cleared all the caches (maybe not necessary) and tested. At that point I had two blocks on front, so disabled the old one. The new one has no sorting exposed. Search still lands on the same search results page.
I'm sure there's a way to use some kind of "if on front, don't print this sort bit" logic in a twig template, so that's also an option. But I'm more familiar with Views than with twig work.
Comment #14
hongqing commentedThis is exactly what I am looking for. #3 and #13 are the solutions with Drupal 9. More details as below:
1. create a search result page with
FILTER CRITERIAandSORT CRITERIAexposed withExposed form in block:No.2. Duplicate this page. Uncheck
Expose this sort to visitors, to allow them to change itinSORT CRITERIA, andExposed form in block:Yes.3. Place the exposed form from the page duplicated in the block region.