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 am trying to put inside a panel a view which have exposed filters.
Is it possible to stay inside the panel when the exposed filters are used ?
If yes, How can we do that ?
If no, is it something that is planned to be added ?
Comment | File | Size | Author |
---|---|---|---|
#43 | 215927-improve-exposed-form-in-block.patch | 5.42 KB | merlinofchaos |
#40 | 215927-improve-exposed-form-in-block.patch | 4.88 KB | merlinofchaos |
#28 | Screen shot 2010-04-25 at 2.28.23 PM.png | 329.89 KB | capellic |
Comments
Comment #1
julma CreditAttribution: julma commentedI have something working :
I set the panel url to "panel1/%"
and the views url to "panel1/views1"
Then I have put the view in the panel and now I can use an exposed filter of the view, for example "node type" and use this filter inside the panel.
I am not sure though to understand how everything is working so if somebody have more details about how a view is supposed to work inside a panel, I am still intersted.
Comment #2
zmove CreditAttribution: zmove commentedAnother solution tested & approved by me is to theme the redirection of the form in your template.php
Comment #3
sunComment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedsubscribing...
if this is the only way to get exposed filters to work, then so be it!
btw- this is NOT fixed
Comment #5
skizzo CreditAttribution: skizzo commentedI am addressing panels with URL's like review/18/96 where
first argument is used by panel, second argument is handed over to view
panel name: review
panel URL: review/%
view name: review
view URL: v/review/$arg
what exactly should I add to template.php? Not being a programmer, so far I only
managed to get a white page. Maybe I am missing something trivial, or maybe it
can't work in my use case? Thank you.
Comment #6
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedThis has not been fixed for D5.
1. create any view with exposed filters; http://mysite.com/myview is the url
2. create node/%/somepage
3. create context
4. add myview to a pane in the panel (you can use legacy views or import view)
5. set arguments
Option 1:
set url to panel
I am taken out of the panel and to the original view page
more link and link to view go back to http://mysite.com/myview
Option 2:
set url override manually:
node/$arg/somepage (which is the url of panel)
While the more link and the title link goto the http://mysite.com/node/$arg/somepage (where $arg is replaced), the exposed filters go back to the original view again.
Comment #7
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am closing this. My problem was with Views Exposed Filter block specifically. It is not working with panels. I will repost there. Thank you for your patience and understanding.
Comment #9
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedWhen exposed filter block is added to a panel page, the submit button takes me to the url of the view not the panel even if the panel override is set.
Comment #10
dawehnerdid you created a view with a display page, can you try to add a view pane as display type.
This should solve the problem.
if not you could try to set
$view->url
Comment #11
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedDereine, how would I set $view->url?
Comment #12
glass.dimly CreditAttribution: glass.dimly commentedAnother option is to use the Insert View module and embed a view in a node, then add that node to a panel. This worked for me.
Comment #13
ctalley5 CreditAttribution: ctalley5 commentedSimilar issue... only not sure the Insert View module will work.
I have a view that has 2 View Panes... (1 table & 1 Gmap)... and exposed filters - no arguments. I have the 2 View Panes placed on the same Panel as well. The URL i have for the panel is.... www.example.com/browser.
Since I have 2 view panes that should be linked by the exposed filters, I don't think it will work embedding the view into a node.
Comment #14
esmerel CreditAttribution: esmerel commentedIf this is happening under 6.x-2.x, you need to try it with panels 3 - Panels 2 will not have any further updates for Drupal 6. I'm not going to close it yet because it's been reopened a couple of times, but I'm not going to let it sit active if it's not for a current version of Panels.
Comment #15
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedIt was happening under panels 2.
Currently this is still the case in panels 3.
Exposed filter block placed on a panels page does not work as per #6.
Thanks,
Chris
Comment #16
joeslow CreditAttribution: joeslow commentedIn Panels 3, in Panel Pages, in the view settings select to Override the URL and point that to the panel page name.
Works fine without requiring tricks on the view or panel page URLs
Comment #17
R.Hendel CreditAttribution: R.Hendel commentedIs this issue still active?
joeslows hint works fine for me, too.
Regards, Ralf
Comment #18
merlinofchaos CreditAttribution: merlinofchaos commentedSounds like we're all good, then.
IMO there needs to be a mechanism to make this more seamless but for now this works well enough.
Comment #20
slashwalk CreditAttribution: slashwalk commentedHi Joe, how exactly did you get this to work? I went to the view pane in my panel page, click on the pane settings and im not sure what you mean with "panel page name", dont i have to input the panel url in Override URL? Do i have to set anything on the View? or just on the panel page? Thanks in advance
Comment #21
paul.brightlemon CreditAttribution: paul.brightlemon commentedHere's how I got it working using joeslow's method - Go to your panel page's edit screen and click on 'content'. Go to the 'settings' screen for your view content. In the 'override URL' field, enter the URL from your view page (NOT the panel's URL). Hope this helps!
Comment #22
srsbl CreditAttribution: srsbl commentedIt also works if you create a content pane display and set "Use panel path" to Yes, under the Pane settings. Then you just need to select that view pane in the panel.
Comment #23
crutch CreditAttribution: crutch commentedsubscribe
Comment #24
pelicani CreditAttribution: pelicani commentedAwesome tip.
I wondered when that would be useful.
Now we know.
thx joeslow
Comment #25
R.Hendel CreditAttribution: R.Hendel commentedHello,
for me setting "Use panel path" does not work.
I am at march in calendar. By clicking in next (month) url changes to /calendar?=calendar%2F2010-04 but calendar displays month view of march...
Clicking back gets same result.
Comment #26
merlinofchaos CreditAttribution: merlinofchaos commentedcalendar has its own issues with Panels because of its rather complicated arguments.
Comment #27
bowwowadmin CreditAttribution: bowwowadmin commentedI am trying to have an exposed filter in pane 1 and results in pane 2 I tried to follow #16 but to no avail. what should my views settings be and such?
Comment #28
capellicI was able to get this to work. My case is extremely similar the one in #13. I tried what Paul instructed in #21, but that wasn't right.
My Case: Allowing one exposed filter to control two views in a panel.
I have a business directory page with two views, a list taxonomy menu displayed as a block and the need to have "search terms" exposed filter. I have a screen shot attached to clarify my case.
Both views have to be setup as displays of type "page" as these are the only types of panels that can have exposed filters (as far as I know).
Add the "Search: Search Terms" filter to both displays and make both of them exposed filters. Both displays should have the same Filter Identifier for the search terms filter. If you've left the default as "keys", you're fine. In the Basic Settings section of the display configuration, set "Exposed form in block" to "Yes" -- but we're only going to use one of them. We do this so that both views are listening for a filter.
In my case, I wanted the exposed filter in the right sidebar, and not the view. I added one of the two exposed filters to the right sidebar on the Blocks list page.
Add both views to a panel. In pane settings for the view that is being used for it's exposed filter, set the Override URL to the panel URL. You may want to set the Override URL for both of the view panes just to be safe.
Since I also have a taxonomy menu displayed, I chose to check "Send arguments", but it isn't necessary just to get the exposed filter to work with both view panels.
What's really cool in my case is that if I search after having already selected a taxonomy term, I will search *within* that term.
Comment #29
wolfraem CreditAttribution: wolfraem commentedThis is really cool, thanks for sharing that. Perfect timing, too -- needed the "duh" moment reminder on the "exposing the filters as a block" option in the view settings.
Comment #30
greg.harveyI think is still active. It certainly behaves very strangely. I finally got something to work, largely following #28, but if your two pieces of content are in the same region (filter and output) then it seems the order matters. And, counter-intuitively, your results pane needs to be first!
To repeat what I'm seeing, create a new view with a page output and exposed filter search terms. Then create a panel page and place both the exposed filter (page, not defaults) and output (again, page, not defaults) in to the same region, but make sure the exposed filter form sits *above* the output. For the output pane, Override URL needs to be the panel page URL, as described above. Save and search, and you'll find that even though you have set an Override URL, it is ignored and the View URL is used instead. Or that's what I'm seeing anyway.
Switch them around (output pane first and filter form second) and it works! =/
Ps, I worked around this by creating a new region above the current region and putting the form in one and the results in the other - then #28 worked for me, so the bug is specifically if the form and results reside in the same region.
Comment #31
EvanDonovan CreditAttribution: EvanDonovan commentedSee #808178: Make the exposed filter blocks available to panels, even though the only other views blocks are the "content panes" for the way that getting just the exposed filter to show in a view would have to be fixed.
Comment #32
meba CreditAttribution: meba commentedI can confirm this is still a problem in Panels 3.
I have a View with Content pane display, I have "Use Panel path: Yes" and in Panels settings, I have url overriden to X. The view doesn't have any Page display.
I have AJAX on.
First reload works. Second generates a filter form with "/" action instead of the panel path.
Comment #33
merlinofchaos CreditAttribution: merlinofchaos commentedYes, it is a known issue that when using AJAX, pane override settings get lost. There is no way to fix that.
Comment #34
MickC CreditAttribution: MickC commentedHow do I get a panel argument to get passed through to a view filter?
I have a page with a panel containing a view, which receives an argument from the page, but also has some exposed filters.
This is all working perfectly, however if I click Apply on the exposed filter, I go through to the page display of the view which also uses exposed filters - but the argument is being sent in the url path (/arg), and it needs to get passed to the exposed filter (?field=value).
I can't seem to modify the view url override/panel url override/argument options to get this to work.
Any ideas?
Comment #35
3dloco CreditAttribution: 3dloco commented@MickC
I also was having trouble with arguments and filters, but in my case I was using content panes display for a view that also had a page display. However, I did not want the user to be directed to the page display after using the filters.
I made it work using content panes since I have additional settings regarding the pane settings (including where to get the arguments for the pane).
For the Content Pane Settings:
-Admin title: Use view name
-Admin desc: Use view descrip...
-Category: View panes
-Link to view: No
-Use Panel path: Yes
-Argument input: Edit
--- Argument Source: From Context
---Required Input: Raw String
-Allow settings: Some
---Path override
For the Arguments:
I first created a placeholder for my argument using %name and set the panel path to page/%name
Then, I set up the context for the arguments as a STRING and set the context identifier to %name (same name as the placeholder for my argument).
After setting this up, I added the content pane and set the "Override Url" to /page/%name:raw
For the Filters:
I moved the exposed filter to a block as explained in #28 by capellic.
-I first changed the content pane setting "Exposed form in block" to YES.
-Then, added this block to my panel (by the way this block is under the Views link/tab).
Hope this helps,
KH
Comment #36
merlinofchaos CreditAttribution: merlinofchaos commented#34: At this time there is no way to get arguments to go to filters.
Comment #37
hawleyal CreditAttribution: hawleyal commented#35 is not working for me.
"View > Content pane > Use Panel path: Yes"
This allows the filters to work within the view on a panel.
It doesn't enable an exposed form block to have the correct path.
"View > Content pane > Allow settings: Path Override" and corresponding "Panel > Pane > Override URL"
Must accomplish something similar to use panel path, but with custom paths.
It doesn't enable an exposed form block to have the correct path.
A possible solution exists in a related issue.
Shouldn't this be a fixed in panels directly though?
Why would you ever want to override the path for the content pane, but not it's corresponding exposed form block?
Comment #38
hawleyal CreditAttribution: hawleyal commented#30 speaks the truth about the order.
But even if you put the form in a different region, it must be after the results.
This is pretty useless. Who wants the filter form below?
It does work if you do 2 column and put the filter form on the right. Meh.
Comment #39
MrMaksimize CreditAttribution: MrMaksimize commentedOy. Ok not sure how I got this to work, but here's the deal.
I created a view with default, block and content pane displays. For Default and Content pane, I did not use the exposed filter. but for block i did.
Then in the pane, I added the view's block as a widget, and the view itself as a block.
For some reason, that works flawlessly. I also have ajax enabled in the view.
Lol BUT can anyone tell me WHY that worked. I got it working on a fluke
Comment #40
merlinofchaos CreditAttribution: merlinofchaos commentedHere's a patch. This patch improves the exposed from in a block content type to include a checkbox to allow you to inherit the path. For new blocks this should default to yes since that's the more likely desired setting. For existing blocks this will default to unchecked since that is the current behavior.
I cannot reproduce nor explain why the order is important. For me, the order seems to have no relevance whatsoever. I will say that the 'block' view display does not accept exposed filters unless AJAX is on, so this may be part of the problem. You should probably use content pane displays instead, anyway. For my tests I did this with one content pane and one block display and both managed to use the exposed filters, so long as they have the same identifier.
Comment #41
sunIf this pattern happens more often, then it might make sense to adopt something along the lines of D7's new hook ($type) argument of http://api.drupal.org/api/function/drupal_alter/7 -- i.e., when passing
array($subtype_info, $plugin)
, return whatever is available first.Can we try to clarify the relationship to 'override_title' a bit more? I've to guess that it might have been introduced at the same time? (I don't think so? but perhaps mistaken)
This kung-fu could use some code comments explaining underlying expectations and intentions.
Powered by Dreditor.
Comment #42
merlinofchaos CreditAttribution: merlinofchaos commentedGreat idea, though it'd be difficult to modify the existing function to do it since the $plugin is already an array. But maybe a secondary function could do the job and loop through an array or do something nifty with func_get_args(). That's an interesting idea for later, though, it wouldn't be part of this patch.
Not sure it needs to be stated; override_title is available on every item with settings, unless specifically included; so testing for it tells us whether or not settings have previously been made. At least in theory. I don't think I tested to confirm.
Comment #43
merlinofchaos CreditAttribution: merlinofchaos commentedMichelle had problems when the delta had been turned into a hash due to length issues. This patch should fix that, plus addresses sun's comments as well as I can.
Comment #44
merlinofchaos CreditAttribution: merlinofchaos commentedOk, feedback is that this is working, so I've committed it.
Comment #46
AdrianB CreditAttribution: AdrianB commentedJust wanted to thank srsbl in #22 for guiding me in the right direction.
Comment #47
jayhariani CreditAttribution: jayhariani commentedExcellent tip. #22 worked for me with a relatively simple table and exposed filter.
Comment #48
nJim CreditAttribution: nJim commented#35 You are a life saver.
Comment #49
a.milkovsky#35 you are right.
The main setting was in views for "Content Pane Settings": Use Panel path: Yes.
thanks
Comment #50
nigelwhite#49 Thanks for your summary. That's all I needed to do.
Drupal 7.60. Panels 3.9