How to have multiple nid filters in Views similar to "Is one of" for Taxonomy

| | 1 min read

If you are creating a View using the Drupal Views module and if you want to filter nodes based on nids (Node > NID filter) then Views gives you options to filter it based on a single argument of the nid. Currently there is no direct way to have multiple nid filters in Views similar to "Is one of" for Taxonomy. However there is a workaround to achieve that. Read onto find out more.

You can setup multiple nid filtering as follows

  • In your View instead of nid filter, add an argument Node:nid.
  • Next set Default argument: Fixed entry
  • Next Add the nids with plus signs. eg. 1+3+5
  • Finally check the Allow multiple terms per argument field.
  • This will show nids 1,3 and 5.

Hope that helps.

The easiest way to solve a Drupal issue is to hand it to the Drupal experts. Do you need professional help in building your Drupal site? We can provide a wide range of Drupal services to help you deploy your Drupal site easily and quickly. Get in touch with us to know more.