Views: How to exclude current node from output

User login

In Drupal 6 there is a very easy way to exclude the current node from the views output. 

In order to that, we can use views arguments:

  1. Add an argument in our view. Select the Node: nid option
  2. In the 'Action to take if argument is not present' select the 'Provide default argument' option
  3. The 'Default argument type' should be set to 'Node ID from URL'
  4. Check 'Exclude the argument' option from the bottom. 

That's it! As simple as that, the current node will be excluded from the views results. Enjoy :)

Tags: 
Drupal 6, Drupal Quick Tips