I have a content type called products. The url is products/[node:title], i.e. /products/pear, products/banana, etc.

On the node page itself many of the fields of that node are hidden, because I want them displayed in tabs, along with content from associated nodes (via Entity References). So I am using Quicktabs and views to display this content. However, I can't work out how to pass the NID to a view if it doesn't appear in the URL. Since I just want to pass the NID of the page I am on, this seems like it should be a simple issue, but I can't work it out.


Ok I've worked it out. The URL that QuickTabs references is the System URL, so the NID is there and can be referenced just by %1.

I knew there would be a simple answer! Hopefully this will help someone else.


You need to use contextual filters on your view.

  1. Under view settings -> Advanced -> contextual filters -> Add 'Content: Nid'
  2. Under 'When the filter value is not available' -> provide default value -> Content ID from URL

Then save the filter / view and it should be set up to pull the nid from whatever page it is displayed on.

  • Thank you Patrick. Actually that wasn't the issue I was having, but I worked it out literally when you posted. I will post the answer below. Thanks again. – James Mar 17 '15 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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