Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
What would be awesome is to have a nid filter where you could exclude the current id from the view, that way you can make menus using blocks, and the menu items can have a thumbnail picture, title and description. With that filter the post you are looking at wouldn't show up in the menu.
BTW Views 2 has a nid filter. I thought Views 1 did too actually, but I guess it doesn't. Can simulate it with an argument + argument PHP code to take care of it, so am not really too concerned about it.
But how do you use the nid filter to filter out the current node as opposed to a specific nid? Alternatively, how do you filter out a record based on a given argument? I no longer see the options dropdown for the arguments that lets you choose "not equal" like in Views 1, so I wonder how this is done in Views 2. There's gotta be a way to pass an argument and tell Views to display all records NOT matching that argument, but all the default handlers do it the other way around.
Comments
Comment #1
catcher, why not node title?
Comment #2
moshe weitzman commentedbecause the View breaks if the node gets renamed.
Comment #3
catchThat's a good reason.
Comment #4
ipwa commentedWhat would be awesome is to have a nid filter where you could exclude the current id from the view, that way you can make menus using blocks, and the menu items can have a thumbnail picture, title and description. With that filter the post you are looking at wouldn't show up in the menu.
Comment #5
merlinofchaos commentedhttp://drupal.org/node/83415
Comment #6
merlinofchaos commentedBTW Views 2 has a nid filter. I thought Views 1 did too actually, but I guess it doesn't. Can simulate it with an argument + argument PHP code to take care of it, so am not really too concerned about it.
Comment #7
ipwa commentedI solved it in my case using a Node:ID Argument with a not equal option and using the following Arcument Code:
Thanks for the link and the quick response merlinofchaos :)
Comment #8
illuminaut commentedBut how do you use the nid filter to filter out the current node as opposed to a specific nid? Alternatively, how do you filter out a record based on a given argument? I no longer see the options dropdown for the arguments that lets you choose "not equal" like in Views 1, so I wonder how this is done in Views 2. There's gotta be a way to pass an argument and tell Views to display all records NOT matching that argument, but all the default handlers do it the other way around.