I'm developing a catalog system, and so far, Views is working beautifully. However, it's a pain that every node entry in the catalog is automatically displayed on every view. I'd like to know if there's a way to get views to not display every node, just the filters. Then, once the user enters filter terms, the nodes are displayed.

Thanks!

Comments

solidarity’s picture

CORRECTION: I'm using Views for 4.7, not cvs as listed in my issue.

merlinofchaos’s picture

I assume you're using the exposed filters?

Set the exposed filters to filter to something that won't provide any results, and play with the defaults checkbox in the exposed filters section. You should be able to get views to default to nothing, I think. I'm not sure; it's not a use case I'd thought of.

merlinofchaos’s picture

Status: Active » Fixed

No response in awhile; marking this fixed.

Though to chew on, another possibility is to put some code in the php_args section that could force the view to use an arg that will produce no results if there are no filters being used. That's more difficult, though, than simply playing with the exposed filter defaults.

A third possibility is to use some trick like http://www.angrydonuts.com/displaying_views_exposed_filters to put your initial filter somewhere else.

Anonymous’s picture

Status: Fixed » Closed (fixed)