Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, i would like to separate exposed filters and sort into 2 blocks (in default it goes into single block).
Can you help me? Thank you
Comment | File | Size | Author |
---|---|---|---|
#3 | exposed.jpg | 31.66 KB | venoXis |
Comments
Comment #1
merlinofchaos CreditAttribution: merlinofchaos commentedThere is no way to accomplish this, because there is no way to split a single
<form>
tag across multiple blocks. You'd have to have the blocks together and the<form>
could span them, but even that you'd have to do very much by hand. Sorry!Comment #2
merlinofchaos CreditAttribution: merlinofchaos commentedI agree it is not convenient. Sometimes convenience must be set aside for other concerns, unfortunately. In order to make it a UI flag, it would have to become a fully baked feature; if you can't use it in the UI naturally, then the existence of the flag would be very confusing. In order to use it from the UI then, we would have to have some kind of token setup. And once we do that, we might need some other set of footer tokens. This can get very complex, very fast, you see, because of the chain of expectations we create with UI elements.
Comment #3
venoXis CreditAttribution: venoXis commentedI thought it. So other option is via CSS. I tried to paint it (attachment) what i need. If there is not way to separate, is there way to add new other submit button? I know that is not clean way but i realy need it. Any other ideas?
Thanks
Comment #4
bporter2387 CreditAttribution: bporter2387 commentedThis is how I did it.. Maybe not the best way, but certainly a way.. (idk if this works with the block system. I'm using views content panes)
Expose the filter in a block. Then in panels, you can display the block multiple times in any region you want. Then use CSS to hide and show the id's.
.content #edit-tid-wrapper {display:none;} \\ this will hide the taxonomy exposed filter in the content region
.sidebar-left #edit-location-wrapper {display:none;} \\ this will hide the proximity location filter in the sidebar left
Hopefully that helps.
Comment #5
gettysburger CreditAttribution: gettysburger commentedI am trying to do something like this but just want to split the exposed filters between two separate divs. I have six filters and want two of them wrapped in one div and the other four in another div. Is this possible? Thanks.
Comment #6
deggertsen CreditAttribution: deggertsen commentedSee these issues:
#1444758: Separate exposed sort form from exposed filter block
#1337580: How to split the exposed filters to separate blocks?
Comment #7
jelo CreditAttribution: jelo commentedDid anyone get these workarounds, such as showing the exposed form multiple times and hiding elements in it, to work with AJAX? As soon as I put the exposed form on the page a second time AJAX stops working...