Not sure if this is a Views or Panels issue.

When you create a view with exposed filters, you can use an option "Exposed form in block:" which provides a block with the exposed filters to put them anywhere in the site.

These blocks are not available in Panels in the lists of blocks to be added to panels.

CommentFileSizeAuthor
#1 panels-324566-1.patch3.28 KBduellj

Comments

duellj’s picture

Version: 6.x-2.0-alpha2 » 6.x-2.x-dev
Status: Active » Needs work
StatusFileSize
new3.28 KB

Here's the start of a patch that adds support for showing views exposed form blocks in panels. Known Issues:

  1. Currently, it only works for regular views, not views panels (though adding support for views panels should be relatively easy, just haven't tested it)
  2. When editing exposed form panel, doesn't display any options except for the default panel options. I'm not sure if it needs to, just documenting that it doesn't

Basically this is just copied code from the hook_blocks function from views.module.

lwiegand’s picture

The patch works beautifully, thanks!!

scottrigby’s picture

This doesn't seem to be working for me.

I have a block view displaying a list of OG nodes. I exposed OG groups filter, and set "Expose form in block" to Yes in Views.

This patch does allow the newly generated exposed form block to appear in the list of available blocks in panels. But when I add that exposed filter block to the panel pane, it doesn't work properly. It displays in the panel pane, but here's what happens:

* When I 'apply' filter button, the page is redirected from http://mysite.com/panel-path to http://mysite.com/?group_nid=7 (doesn't seem to pass along the existing args).
* And even when I paste the query into the url, like http://mysite.com/panel-path?group_nid=7 this doesn't actually filter the results properly.

Any ideas where I might be going wrong? I'm curious why the patch works for lwiegand but not for me.

socialnicheguru’s picture

I have this exact issue:
http://drupal.org/node/419556

And it is similar to an old discussion about a similar topic on Views Filter Block. This would be great to get corrected
http://drupal.org/node/112552#comment-1192866

socialnicheguru’s picture

deleted comment

dorien’s picture

Would be appreciated if you could correct agains alpha 3

socialnicheguru’s picture

I was told to repost to forum so here I am

Bounty to fix exposed filter block in panel3 pages and organic group tabs for D6. I am willing to chip in to make it happen. If there is a developer who could do this and possibly use chipin to gather more support.

http://drupal.org/node/445446

I would like to see exposed filter block in panels pages using Views2 get fixed for Drupal 6.

Currently exposed filter block works if
1. no panels
2. no views as tabs

but I would like to have it work in those two areas

1. as tabs in an organic group (node/%/foo)
2. with panels

So in essence, they should redirect to the correct page.

1. exposed filter block in a view with path url node/%/foo and it is a tab

Create a view
The path is node/%/foo (use case is tabs in organic groups)
node/% represents a group
If I place the exposed filter on node/*/foo and click submit it should return to node/nid/foo
currently it returns node/all/foo (not quite sure why)

2. exposed filter block for a views pane in a panel with url node/%/foo/$arg1/$arg2
this is a panel override
%- group context
$arg1- first argument
$arg2- second argument

have pane override the url in pane settings in view
place view pane in one pane of the panel
place exposed filter block for that view pane in the panel

click submit.
It should filter the panel page

currently it returns back to the original view

Relevant issues
How do you display Views' exposed filters in a block? Drupal6!!
http://drupal.org/node/290691

'Exposed form in block' in panel returns the wrong url
http://drupal.org/node/419556

Merlin wrote:
The problem here is that the exposed filter as a block is just a simple, Drupal block. Drupal's blocks are dumb and have no sense of context, so it doesn't know whether or not it's in a panel. So it can't pull the URL from the panel it doesn't know about. The setting on the panel pane therefore cannot affect the exposed filters in a block.

Any help to fix this would be greatly appreciated

It goes without saying that the functionality of the filters (whatever they might be) should not be negatively impacted.

Regards,
Chris

ck9’s picture

Any progress on this?

merlinofchaos’s picture

Status: Needs work » Closed (won't fix)

Panels 2 is no longer available and is unsupported. Marking all Panels 2 issues won't fix.

MickC’s picture

How can I set the path for an exposed form?

I have a content_pane in views with an exposed form, which I added to the front page - content_panes as you will know has no path.
I would like to use this form on several different pages on my site, so that when a user hits 'Apply' they will always go to page 'Events'.
'Events' is set up as a panel page, also with the exposed form in one pane, and the results in another pane.

However when I hit 'Apply', it redirects me to /events_page, which happens to be the path in another display of type 'page'.

How can I control the path triggered by the exposed form in this usage situation?

Thanks,
MC

duellj’s picture

MickC,

This issue is no longer active, and your comment is unrelated to this issue. Please post a new "Support Request" issue or a new topic in the forums. Thanks.