I don't have any 'Empty Text' and my view query returns 0 results. However the title of my Panel Pane is still appearing. Is there a way to get the title to not appear when there are no results? I thought this would be the default behavior, but it does not appear to be.
Thanks.
Comments
Comment #1
actuan commentedI'm having the same problem. I think part of what's happening is that the panel actually contains formatting data though it doesn't have results from the view. Anyone have advice on code that will prevent a pane from displaying if the view which provides the data has no results. The code should be based on the number of items in the view rather than the content of the pane.
Thanks!
Comment #2
KingMoore commentedSince someone else is having this problem (Not just me!) then I feel better marking this as a bug for now.
Comment #3
dawehnerCould you try to reproduce it with the newest version of views?
If it does work there, be free to close the issue. Thanks!
Comment #4
m_z commentedI'm using not the latest views version (2.6), but in the relase notes for 2.7 and 2.8 I couldn't find changes regarding this issue.
I have this problem in combinations with Panels 3.x
To reproduce it:
- build a view
- create a panel page where you insert this view as a view content pane
- set style to rounded corners for this pane
- save and look at your created panel page
- now change your view (add some filters so that 0 lines are returned)
- look at the panel page again and see a rounded corner pane without any content
If someone will solve this issue (so that empty view is resulting in an undisplayed pane), please let us know your used versions of Views and Panels or what do you changed.
One possible workaround could be a visibility rule for that pane, but this leads to an additional SQL query :-(
Comment #5
dawehnerThats somehow a feature/bug from panels. You can use panels-pane.tpl.php and check whether $content is empty or not.
Comment #6
m_z commented@dereine: Thank you for your advice. This will save some hours of working ;-)