How to avoid particular node_id (current-page) in views ?

Events happening in the community are now at Drupal community events on www.drupal.org.
tejaspmehta's picture

Hello All,

I have created a CCK type of News. Now i have created one view which shows latest 5 news sorted based on dates. This view is displayed in block of News CCK page. Now my problem is when i goto latest news page which is say "News 1" and at that time in block i can see "News 1, 2, 3, 4, 5". I want to remove current "News 1" and display remaining data. I tried it with Argument but didn't get proper solution.

In short my problem is how to remove particular node_id (which is current node_id) from view. I hope my description is enough to explain and if not i will place screen-shot of what i want.

Can anyone please help me out ?

Thank you
Tejas Mehta

Comments

Here is solution. Follow

tejaspmehta's picture

Here is solution.

Follow steps below.
1). Open up your view
2). Create an argument of Node > Node id.
3). Then choose the radio button option of "Provide default argument"
4). Some "Provide default argument" options should appear. Under "Default Argument Type," choose the radio button option for "Node ID from URL"
5). A little lower you should see "Validator options." Where it says "Action to take if argument does not validate," Select "Display all
values"
6). Just below that, checkmark Exclude the argument "If selected, the numbers entered in the argument will be excluded rather than limiting the view."

Thank you
Tejas Mehta