/**
* Block views do not use exposed widgets.
*/
function uses_exposed() { return FALSE; }
Is this result of copy paste or is there a valid reason for no exposed filters? XD
I set it to true and hadn't had any problems -- yet.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_attach_exposed.patch | 866 bytes | hefox |
| #2 | views_attach_exposed.patch | 905 bytes | hefox |
Comments
Comment #1
Crell commentedGood grief, is that still in there? :-)
If it works without that, and exposed filters behave properly (I'm a little concerned about them causing redirects but I've not tested it), go ahead and send in a patch to take that out / enable exposed filters. No sense restricting features needlessly.
Comment #2
hefox commentedBy sending in a patch means attaching it to a post? XD
Well attached is the ... let's see, -10letter+8letter patch to enable exposed filters, hoho!
(Might also do a quick search replace "block" with views attach sometime also XP, I saw it at least twice in one file)
Comment #3
hefox commentedack rofl
I was using views live filter which removes the apply button so didn't notice it kept adding this everywhere
the correct way to do it is just remove the override, not set it to true or else it adds the exposed form everywhere, oops!
Comment #4
jlab commentedHi this makes me quite excited because it's already a step into the right direction for me...
I want to attach a view to a user's profile with ticket node's that is assigned to different users on the system. And displays two filters one for the priority and another for status cck fields.
After changing the following line of code.
I can see the exposed filters. But as soon as you click the Apply button it redirects to a different display in the view thus taking the user away from his profile.
Is there a reason why exposed filters isn't implemented in views_attach yet? And is there a good chance that this feature wil be included in the future releases?
My PHP knowledge is a bit limited at the moment and find the code for this module slightly intimidating (Mainly because I don't know the views module code thorougly) to try and fix this solution myself.
But none the less if someone could steer me in the right direction it would be greatly appreciated.
Comment #5
hefox commentedDoubt it'd help, but remove the line completely instead of changing it to true (my bad, check comment 3 for why). Hmm, I've only tested on node content, but haven't observed the above behavior. Sounds like the forum's action parameter is wrong from the described behaviour, ie the submit page to says the view page instead of the profile. As for why, no idea atm
Comment #6
Crell commentedTry applying the patch in #3 specifically and see if it does what you need. I'd love to get this committed if someone can verify that there's nothing else we need to do in order to make exposed filters work.
Comment #7
Crell commentedThe patch above didn't apply properly because it wasn't rolled from the right directory. It was simple enough that I just went in and deleted the lines anyway and committed. So this should be fixed in the next release, whenever that is. :-) Thanks.
Comment #9
no2e commentedDo I get it right, that it will be possible to use Exposed Filters at Views attached to nodes?
If yes -- whoa, great! Can you estimate, when it will be released? That's the only feature missing for me to use Views attach at my site.
Comment #10
hefox commentedSorry for re-opening, but I believe I was incorrect in saying it was working; it is... with AJAX enabled, which was what I was testing with it I bet.
A workmate told me about this; The reason blocks don't have exposed filters is due to the lack of path, which is the same with view's attach? However it does work with ajax... so I bet there's a way around it.
However, thinking about it, I believe it was also working with the exposed filters in a block and no ajax, hm.
Comment #11
Crell commentedI have no specific ETA for another release, but you can use the dev tarball if you want. Just go to "see all releases". Usual warnings about using dev releases apply.
As for the comments in #10, um, hm. I do not know. :-) Can you provide some testing of the situations in which the current 6.x-dev release does/does not work with exposed filters and report back the results, so we at least know where we stand?
It may make sense to ask merlin to weigh in here, too...
Comment #12
hefox commentedHaven't gotten around to getting those test views (I had a lazy-fox weekend), but I believe this is the relevant post in the views queue http://drupal.org/node/156130
Comment #13
Crell commentedI spoke with merlin about this a bit, and did some tinkering. Short version: Blocks and exposed filters only work with ajax. Ideally we'd like to make views_attach work without ajax, too, but we tried to make it work and ran into problems. Details here: #156130-21: Exposed filters: URL processing on embeds.
So for the time being I am going to commit the same code to views_attach that block display use to only show exposed filters when ajax is enabled. It just won't work at all in non-ajax mode, but at least won't be misleading. Sorry, best we can do for now.
If anyone has a better idea of how to handle this, please address it in the issue linked above, not here. If more work on views_attach is needed for that, open a new issue and leave this one closed. Thanks.
Comment #14
hefox commentedSorry for opening it... again. But now it's just a support request XD.
Using a form alter on the exposed filter form (testing for view and and display ID), someone can set the form action to $_GET['q'] and get the form to direct to the right page without ajax (tested with insert_views, assume same with views_attach). So the question is there an easy way to get around the alterations that prevent it from working if ajax isn't enabled?
Comment #15
Crell commentedhefox: Um, not to be blunt but what part of "open a new issue and leave this one closed" do you not understand? There will be no more patches in this issue.
Comment #16
hefox commented(Bleh, nvm on the question then I'll figure it out myself; posting here because above was asked in question form so I feel obligated to explain myself [the problem with reotirical questions :