I'm not sure if this is a bug report or feature request, but I'm filing as a bug for now. Currently, the order of elements on a View (as defined in theme_views_view()) goes:

if (has nodes) header
filter form
if (has nodes) body
else empty text
footer

The result is that one cannot have text above the filter form if the last filtering returned nothing!

I'm not sure of the optimal solution here. For the time being I believe I can simply override the theme function in the usual way, but a more general solution seems appropriate. Perhaps simply a checkbox to indicate if header and footer text should be displayed even if the node list is empty? That would seem the most logical solution to me. Thoughts?

Comments

merlinofchaos’s picture

Category: bug » feature
Priority: Normal » Minor

Bah I say! =)

It makes sense. I don't want to make db changes in 1.5 though, so I'm pushing this to the future.

And I'm calling this a feature request. It's not technically a bug, but...it is an irritating non-feature.

nschelly’s picture

I think I'd prefer to see Views implemented so that the header can optionally be displayed even with no results. For the views I've created, I want the header there regardless of whether or not there are results and I'd just like the "Empty Text" to say something like "There are no results to view."

I could look into submitting a patch to accomplish this, if there's any other interest.
-N

sun’s picture

Status: Active » Closed (won't fix)

Development on 4.7.x has ended.