Closed (duplicate)
Project:
Panels
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Anonymous (not verified)
Created:
13 Mar 2009 at 00:45 UTC
Updated:
16 May 2024 at 00:49 UTC
Jump to comment: Most recent
Comments
Comment #1
davidcgutman commentedI probably should create a separate issue for it, but I'm guessing it's related. This is true for a normal panel as well if you include a view block as content - it will show up as an empty pane even if the view returns no fields. The "User Login" block disappears as it should when the user is logged in though...
Comment #2
Anonymous (not verified) commentedMaking this a feature request instead.
Comment #3
merlinofchaos commentedMost panes do hide themselves when empty. It's possible either that 1) mini panels do not, or more likely, 2) the mini panel isn't truly empty. Sometimes things can apepar empty, but still have markup in them, and that markup appears to the code.
Comment #4
EvanDonovan commentedMini-panels hide themselves when empty unless there is markup in them. I have noticed that this problem happens especially when you create a tabbed mini-panel using the Tabs Panel Style. The views have markup in them even if they are empty. Thus, the title will still show. Any solution for this would be appreciated.
Comment #5
Tarsjusz commentedDon't know if writing this in proper place:
After upgrading to panels 3.1 from 3.0 panels containing empty views are not hiden any more. There is no footer nor header in this views. Simply look at http://tarsjusz.pl/person/krzysztof-spalik , panel with title ,,Koordynuje:'' is an empty view and was not displayed until upgrade.
Any help would be highly appreciated, as the only solution I know is to downgrade.
Comment #6
brianmercer commentedI extracted the panels-pane.tpl.php file from the 6.x-3.x-dev version of Panels and put it in my theme directory initially in order to make the heading changes I wanted.
I also had panes appearing without content. If their title was empty (and probably not using the rounded corner style) they were invisible, but since I had some padding attached, they would mess up my layout. So I wrapped the tpl in an if statement like this:
and that solved my problem for now.
Comment #7
shaneonabike commentedI also noticed that adding a 'filegroup' to a minipanel isn't being hidden properly. Inside my minipanel I have four File_field CCK types (Image, File, Media, and Link). Normally, these are hidden on nodes if they are empty but for some reason there seems to be a bug in panels that isn't hiding these properly.
I created some code to try and resolve this and hide the content when empty. It would be great if we could resolve this issue for the next release.
Comment #8
Doomd commentedI have a mini-panel block that contains 4 views blocks. When those views blocks are empty, I'd like the whole mini-panels block to hide as well.
Comment #9
merlinofchaos commentedI don't think that's possible, because there's no way to have the entire display hide if all of the content panes within it are empty.
Comment #10
sdboyer commentedConfirming that, merlin - just went through the mini-panel code again for a sort-of-related issue. Would require a fairly painful rewrite, unfortunately.
Comment #11
merlinofchaos commentedRe-opening. With the new render pipeline, I think this is much more possible now. We could slide a check into panels_renderer_standard::render_layout() and set a flag on the display (or renderer) to abort the rendering if there is no rendered content at all.
Comment #12
EvanDonovan commentedI actually transitioned away from tabs panels style to quicktabs due to this bug, so it would be cool if it were fixed.
Comment #13
merlinofchaos commentedI really hesitate to call it a bug.
Comment #14
glennnz commented@merlin
Earl, from here -> http://drupal.org/node/216076#comment-3337056
Do you have a timeline for #11?
Not trying to be pushy, but this would be pretty cool ;-)
Cheers
Glenn
Comment #15
agileware commentedSubscribing
Comment #16
hnln commentedsub
Comment #17
bryancasler commentedsubscribe for a D7 solution
Comment #18
held69 commentedsubscribing
Comment #19
henrijs.seso commentedsubscribing
Comment #20
jruberto commentedwill probably dig into a .tpl.php based solution to meet immediate needs (and will share if i come up with something viable / portable), but subscribing in case the silver bullet appears...
Comment #21
hnln commentedI still get this (D7 alpha 3 en dev) with standard view panes (the panel is a single view pane), the mini panel renders and the content is
(so no view classes or divs). So this shouldn't be a feature request but a bug ?
In this case I fixed by putting the default onecol tpl inside "if ($content['middle']):", which appearently renders although it's empty.
Comment #22
Letharion commentedAs Merlin states in #3, panes normally do hide themselves, as such this can't really be a feature request. As far as I can tell in the issue, no-one has actually shown an example of a truly empty pane that still renders, so it's not a bug report either.
#8 - #11, are as far as I can tell about a related but different issue, which is how to handle several blocks within a minipanel. That seems to be like it should be a separate issue.
Comment #23
R.Hendel commentedI made a simple test to investigate behaviour of panels/minipanels:
You have a minipanel inside of a "normal" panel - e.g. using panels everywhere in site-template.
When you either override a title for pane in site-template which contains that minipanel, or when you override a title for the minipanel itself, then for panels this is not empty, even when minipanels content is empty.
Now you can disuss, if this behaviour is what you expect. ;-)
We have currently a usecase, in which we want to setup a title for the pane which contains minipanel.
Given that minipanel has no content we want drupal to hide this pane. Our solutions is hiding it via js. Not the best way, but it is ok as a workaround...
Comment #24
bryancasler commentedR.Hendel could you share the JS you're using?
Comment #25
dasRicardo commentedHello,
Below the piece of code in question
In case the mini-panel is empty JS is hiding it.
This works only when you use the Tab-Layout in your mini-panels. The Script loops every element with class 'pane-panels-mini' and it tests if a
<ul>is inside. If not, the script hides the element.The
<ul>is the container for the tabs, in case mini-panel have no content to render, it doesn't build tabs resulting in the fact that no<ul>is inside.With some little changes you can use it also without Tabs. My proposition is: You test if the
<div>with class 'inner' inside the mini-panel is empty and if so you just hide it.I hope this solves your problem.
Comment #26
Letharion commented@R.hendel Thanks for clearly describing the problem. Again, this issue contains to many loose ends. New issue based on #23 here: #1367154: Empty mini-panels does not hide when title being overridden.. Closing this one, hoping I can get rid of it.
Comment #27
bryancasler commentedDoing a follow up here with specific instructions to reproduce #1391450: Panels does not hide an empty mini panel
Comment #28
jwilson3Marking status as duplicate... there is interest in this feature and there are already some patches on the follow up issue #1391450: Panels does not hide an empty mini panel.
Comment #28.0
jwilson3Added link to followup issue.
Comment #28.1
jwilson3Link to 2 follow up issues.
Comment #29
shaundychko