All I get after exposing the filter is a text box that nobody will guess what to fill in up.
I did not found any way to get a drop down list or anything that could help selecting an item from the available items.

I have seen many posts and actually succeeded at getting this for taxonomy terms, but nothing for nodes.

Thanks for help

Comments

dawehner’s picture

Status: Active » Fixed

As you may found in the posts you would have to use hook_form_alter and change the exposed form.

There are many many examples about general usage of hook_form_alter but you definitive need a basic understand of php.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jvieille’s picture

Category: support » feature
Status: Closed (fixed) » Active

Shouldn't be a basic feature?

esmerel’s picture

Status: Active » Postponed
merlinofchaos’s picture

Question: What would happen on your site if you exposed this filter and your site had 1,000,000 nodes?

That is why this is not a basic feature.

alex.pilon’s picture

Is that not a developer concern? The same could be said about having 1 000 000 taxonomy terms. Not likely but it could still happen.

acouch’s picture

I had this same problem. Here is how I implemented it with hook_form_alter() using a nodequeue as the node titles I wanted users to select from:

<?php
// Nodequeue ID.
define('MYMODULE_NODEQUEUE_EXAMPLE', '1');

// View name.
define('MYMODULE_VIEW_EXAMPLE', 'home');

/**
 * Implementation of hook_form_alter().
 */
function mymodule_form_alter(&$form, &$form_state, $form_id) {
  $nodes = nodequeue_load_nodes(MYMODULE_NODEQUEUE_EXAMPLE);
  foreach($nodes as $node) {
    $options[$node->nid] = $node->title;
  }
  $default = array('' => t('<select>')); 
  $options = $default + $options;
  // Filter on EXAMPLE view.
  if ($form['#parameters'][1]['view']->name == 'MYMODULE_VIEW_EXAMPLE') {
    $form['nid']['#type'] = 'select';
    $form['nid']['#options'] = $options;
    $form['nid']['#default_value'] = $default;
    $form['nid']['#size'] = NULL;
  }
}
?>

I would add this to the views documentation if I knew where. I know generic elements are in Advanced Help but for snippits the handbook page is not available: http://drupal.org/handbook/modules/views

merlinofchaos’s picture

Status: Postponed » Closed (won't fix)

This shouldn't be postponed.

caspercash’s picture

I certainly would love to have this feature in views where we will be able to filter by node id. I did try the Views Node Filter but wasn't able to get it working.

jvieille’s picture

The argument about the possible number of nodes sound strange.
Specifically, the assumption that the number of nodes could reach very high numbers but not users or terms roots on narrow perspective of what Drupal sites can achieve.
In these conditions, filter by node title is useless, exposing node title/nid has no purpose at all

Anyway, I could make Views Node filter working, though it is limited, not accepting arguments, for example, which makes it irrelevant in many situations.

kenorb’s picture

Regarding the possible number of nodes, there can be settings to limit the records at once, or some sort criteria (most recent, etc.). Or the list can be altered.
Also it could be also autocomplete widget.