In Drupal 6, I have created a view, displayed as a block. My goal is to display some text if the view returns results, and hide it if the view is empty. I am using Header for the text, and this works perfectly except for the requirement to show at least one field. I can't save the view if I don't set any fields for display. Is there a way to get past this, without creating a module or hacking the theme?
+1
A:
You should be able add a field and check its "exclude from display" checkbox.
Scott Reynen
2010-02-28 16:46:18
I actually tried that. If you exclude all fields from display, you can't save the view; you get the same error as if there were no fields to begin with. At the moment I'm getting by picking one field and rewriting the output to be a blank space...
Nicholai
2010-03-01 00:43:35
A:
Do as Scott say, and select for "Row Style" = Node, so Fields will not required anymore...
Nikit
2010-03-01 01:41:23
A:
The user nevets on the Drupal forums gave a great example that helped me solve this. Check out http://drupal.org/node/728336#comment-2659760 for the information.
Nicholai
2010-03-01 15:43:41