Closed (works as designed)
Project:
Panels
Version:
6.x-3.x-dev
Component:
Panel pages
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
31 Mar 2009 at 15:31 UTC
Updated:
23 Jul 2014 at 08:50 UTC
Jump to comment: Most recent
Comments
Comment #1
merlinofchaos commentedThis is a Panels issue. I'd re-file it but I don't know what version of Panels you're using.
Comment #2
socialnicheguru commentedComment #3
dckantor commentedI thought that panels was not recommended for production sites? Is this a development site? Does panels produce the exposed form in block option for a filter in views?
Comment #4
socialnicheguru commentedviews does.
I create a panels view pane
I hit the expose filter block
i place the view panel pane and the exposed filter block in a panel page.
i click on submit and the filter goes back to the view.
exposed filter elsewhere works just fine.
Comment #5
merlinofchaos commentedThe 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.
Comment #6
socialnicheguru commentedWould something like this work? any thoughts on how to modify to get the current panel's url setting (not familar enough with the panels api myself)
http://drupal.org/node/290691#comment-966163
Comment #7
merlinofchaos commentedAt this point they would not be in a block. They would need to be their own ctools content type, perhaps, which is probably ultimately the way to go in Panels.
Comment #8
socialnicheguru commentedcould i contribute somewhere to get this feature in? It is pretty crucial to the layout of my site and I wanted to use panels to standardize everything :) Panles is a kick as* module!
C
Comment #9
ethanre commentedHow can a ctools content type be created?
Comment #10
ctalley5 commentedsubscribe
Comment #11
erik seifert commentedBetter do it so:
Comment #12
mrblaq commentedThis fix is working for me! Thanks :)
Comment #13
Equinger commentedSOLID fix. Thanks you so much, erikseifert!
Comment #14
Exploratus commentedThis worked great....
Comment #15
hyates commentedWow that was a surprisingly easy fix. GJ erikseifert and thanks.
Comment #16
mrtorrent commentedSubscribe
Comment #17
zualas commentedAs I understand, the issue is that when you expose the filters as block and want to add them in a certain area on every page on your site, the input that you provide to the block is not directed to the actual panel where you add the view.
I have solved my case with Panels Everywhere and Views content panes. The steps for setting up a site-wide exposed filter for me were the following:
1) Created a view with content pane display. The content pane has an exposed widget which I want to see on every page. I do NOT set the widget to be exposed as block.
2) I create a new panel page, add the created content pane to it and override the path for the content pane to have the panel path
3) In the site template provided by Panels everywhere I add the same views content pane again, and again I override the path to redirect my query to the panel page
4) In order not to have the content pane two times on the panel page (one printed by the site template, another by the actual page), I set the pane visibility on the site template to hide the pane on the panel page.
That's basically it, the solution is fairly simple but requires Panels Everywhere module.
Dm.
Comment #18
jason.bell commentedIn case of those just finding this issue (like me). Using much of the suggestion in #419556-11: Make 'exposed form in block' work in panels: Change the $form['#action'] of views_exposed_form to request_uri() in panels_pane and on referenced threads I was able to redirect my exposed filter block to the correct custom Panels page.
* View (MY_VIEW_NAME) of data with exposed filters
* Exposed filters in block setting is on
* Views Pane display of MY_VIEW_NAME is added to a custom Panels page with path 'my/panel/path'
* Exposed filters block is used in a custom Panels home page with path 'home'
If a Views page display is available, the exposed form will redirect there. If a Panels page is created and holds the Views pane display pane related to the exposed filters, it doesn't know where to go. By default, applying the filter form on the home page would reload the home page with the filter query attached (e.g., mysite.dev/home?keys=0&tid=1). The action on the form was set to '/' since I had no Views page display.
When I used code from #419556-11: Make 'exposed form in block' work in panels: Change the $form['#action'] of views_exposed_form to request_uri() in panels_pane above it affected all of my exposed filter forms and I needed to restrict it to the specific View in question. Using a suggestion from merlinofchaos elsewhere, I first check for the View name to make sure we only apply to exposed filters of this View.
The exposed filter form now has an action of 'my/panel/path' and redirects properly with the required query string attached. Any suggestions on cleaning up the following?
Comment #19
EvanDonovan commentedI think I came up with a more elegant solution that will work for an exposed filter block in any panels context.
See below:
merlin, do you think it would be possible to incorporate this into the logic of the exposed filter block itself somehow?
Comment #20
EvanDonovan commentedMoving to the currently active version.
Comment #21
merlinofchaos commentedWhen you add an exposed from block to a panel, it should contain an option: Inherit path. That does what this does, without the hack.
Comment #22
EvanDonovan commentedAh, OK. I wasn't aware that existed. Is it new?
Comment #23
scott859 commentedGreetings,
I'm having a problem with this. I have an exposed form in a panel pane, I've checked the option "Inherit path", but the exposed form is not inheriting the path. It is working correctly in non-panels pages. Is there another variable that may be the cause of this?
Thanks for any help you can provide.
Scott
**Update 9-4-11** I was able to correct this - the issue was caused by an oversight on my part.
Comment #24
hyperglide commented@scott859
We are having the same issue -- what was your oversight please?
Comment #25
trevorkjorlien commentedThis worked for me perfectly. I've ran into a snag though.
I'm using Panels Tabs (http://drupal.org/project/panels_tabs) to put some Exposed Views inside. I'm using it to give different sorting options to users after they perform a search using the filters.
Unfortunately, using this code/module, the tabs are now given two URLs. The code for the tabs should look like this:
<a href="#tabs-0-search_results-2">Tab 2</a>But instead, it looks like this when I apply a custom title:
<a href="#tabs-0-search_results-1"></a><a href="/find" class="active" >By Date</a>--
I'm new to using hooks, so I'm lost on this right now. My module code looks roughly the same, like so:
I'm a little confused on why the links to the tabs are given another anchor tag that is defined in the module. Is there any modification to the custom module to prevent this from happening?
Comment #26
tanmayk#11 works for me too :)
Thanks
Comment #27
user654 commented.
Comment #28
rebecca904 commentedif ( $formId == 'views_exposed_form' )
{
$form['#action'] = url($_GET['q']);
}
Works perfect! Thanks for Erik Seifert!
This solved my issue!