Drupal Technical
[Drupal] How to exclude multiple nodes with Views in Drupal?
It is very simply to exclude single nodes using views. But In this section we are going to exclude multiple nodes using Views. Only thing you need to have is contributed module "Views".
For eg : There are three node nids 45, 78, 98 that you to exclude. So to exclude this multiple nodes on it you need you need to add is "Conceptual filter" for nid. Below is the following steps where we can exclude multiple nodes with views.
- Firstly in your view, you will see the 'Advanced' options on the right side. Just click on it.
- Now you'll see the 'Contextual Filters' options. Click on 'ADD' button.
- Resulting will show Add contextual filters page. Search for 'nid' in the search box filtering. You'll find 'Content: Nid' and just check the box.
- Just click 'Apply (all displays)' will display another page 'Configure contextual filter: Content: nid'.
- You'll now see 'Provide default value', click on it and enter the ID's of the nodes that you want to exclude separated by a comma like this: '45,78,98'.
- Finally at the bottom of this page, you'll find 'More'. Click on it.
- You need to just check the box 'Allow multiple values' and 'Exclude' and click on 'Apply all displays'
Just check your view, multiple nodes are now excluded. Hope this articles helps you.:-)