By nancydru on
My customer has a "directory" that currently shows filter boxes at the top and the full (unfiltered) list below the filter boxes. She wants to eliminate the full list and not show any entries until the submit button is used, presumably with filters selected. How can this be done? [And no, I'm not afraid of php code snippets.]
Comments
I have tried
I have tried the argument handling snippet at the top of http://drupal.org/node/70145, but that prevents me from ever being able to leave all the filters at "" to get the full list.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
...
Have you tried to wrap the snippet you have in a check for URL parameters? something like:
(Setting all filters to "" still puts them on the URL so the snippet will execute.)
EDIT: you may need to do
if (!$_GET)instead ofif ($_GET), depending on what you're trying to do.Hmm...
On first entry, $_GET contains array('q' => 'directory'). "Directory" is the View's URL. After I filter, $_GET also contains the three filters. So how does this help prevent the View from running until there are filters present?
I tried this, but it didn't stop the full list from coming out.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Okay
This is really hokey, but it worked.
I selected "Node ID" for the only argument. The default is "display all values" and the Option is "equal."
My argument handing code is:
There is already a filter on node type, and node/1 is not of that type.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru