I have set up a Drupal View (as a block) listing a number of books in my left sidebar (an unformatted list of fields, title, image etc.), in the main area the individual book is displayed as you click on the image in the left sidebar. Is it possible to use the contextual filters to disable that particular book from my view in that left sidebar? I'm relatively new to Drupal! Many thanks if anyone can help!

1 Answer 1


Yes, you can use a contextual filter on a node nid. For its value, select a default argument (since a block won't have it) and then select node id from url. Then also click on exclude the argument. This will create a contextual filter that excludes the node on the page from the View.

  • Hi - I'm on Drupal 7 - I checked 'Provide default value' chose 'Content ID from url' but couldn't see 'exclude the argument' - is that the 'Exceptions' dropdown maybe? I put in my url as a value here but it doesn't seem to work
    – Lisa
    Aug 30, 2012 at 14:51
  • 1
    Ah figured it out - for anyone else that needs this:Views 3 Click on the "advanced" tab. Click on add under "contextual filters". Choose Content:nid. Under "when the filter variable is not available, choose "provide default value". From the drop down menu select "content id from url". Scroll all the way down to the bottom of the window and click on the "More" link. Click "Exclude" - Thanks Jimajamma for your guidance..contextual filters is hard for a newbie like me!
    – Lisa
    Aug 30, 2012 at 15:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.